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

Function luaL_checkoption

third-party/lua-5.5.0/src/lauxlib.c:366–376  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

364*/
365
366LUALIB_API int luaL_checkoption (lua_State *L, int arg, const char *def,
367 const char *const lst[]) {
368 const char *name = (def) ? luaL_optstring(L, arg, def) :
369 luaL_checkstring(L, arg);
370 int i;
371 for (i=0; lst[i]; i++)
372 if (strcmp(lst[i], name) == 0)
373 return i;
374 return luaL_argerror(L, arg,
375 lua_pushfstring(L, "invalid option '%s'", name));
376}
377
378
379/*

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