MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / luaL_checkoption

Function luaL_checkoption

third-party/lua-5.2.4/src/lauxlib.c:320–330  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318*/
319
320LUALIB_API int luaL_checkoption (lua_State *L, int narg, const char *def,
321 const char *const lst[]) {
322 const char *name = (def) ? luaL_optstring(L, narg, def) :
323 luaL_checkstring(L, narg);
324 int i;
325 for (i=0; lst[i]; i++)
326 if (strcmp(lst[i], name) == 0)
327 return i;
328 return luaL_argerror(L, narg,
329 lua_pushfstring(L, "invalid option " LUA_QS, name));
330}
331
332
333LUALIB_API void luaL_checkstack (lua_State *L, int space, const char *msg) {

Callers 4

luaB_collectgarbageFunction · 0.70
os_setlocaleFunction · 0.70
f_seekFunction · 0.70
f_setvbufFunction · 0.70

Calls 2

luaL_argerrorFunction · 0.70
lua_pushfstringFunction · 0.70

Tested by

no test coverage detected