MCPcopy Create free account
hub / github.com/bloomberg/comdb2 / luaL_checklstring

Function luaL_checklstring

lua/lauxlib.c:190–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188
189
190LUALIB_API const char *luaL_checklstring (lua_State *L, int narg, size_t *len) {
191 const char *s = lua_tolstring(L, narg, len);
192 /* COMDB2 MODIFICATION. */
193 if (!s && narg == 1 && luaL_callmeta(L, 1, "__tostring")) {
194 lua_replace(L, narg);
195 s = lua_tolstring(L, narg, len);
196 }
197 if (!s) tag_error(L, narg, LUA_TSTRING);
198 return s;
199}
200
201
202LUALIB_API const char *luaL_optlstring (lua_State *L, int narg,

Callers 14

luaB_loadstringFunction · 0.85
str_lenFunction · 0.85
str_subFunction · 0.85
str_reverseFunction · 0.85
str_lowerFunction · 0.85
str_upperFunction · 0.85
str_repFunction · 0.85
str_byteFunction · 0.85
str_find_auxFunction · 0.85
str_gsubFunction · 0.85
addquotedFunction · 0.85
str_formatFunction · 0.85

Calls 4

lua_tolstringFunction · 0.85
luaL_callmetaFunction · 0.85
lua_replaceFunction · 0.85
tag_errorFunction · 0.85

Tested by

no test coverage detected