MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / luaL_optlstring

Function luaL_optlstring

other_src/lua/src/lauxlib.cpp:190–198  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190LUALIB_API const char *luaL_optlstring (lua_State *L, int narg,
191 const char *def, size_t *len) {
192 if (lua_isnoneornil(L, narg)) {
193 if (len)
194 *len = (def ? strlen(def) : 0);
195 return def;
196 }
197 else return luaL_checklstring(L, narg, len);
198}
199
200
201LUALIB_API lua_Number luaL_checknumber (lua_State *L, int narg) {

Callers 2

tconcatFunction · 0.70
luaL_optstdstringFunction · 0.50

Calls 1

luaL_checklstringFunction · 0.70

Tested by

no test coverage detected