MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / luaL_checkoption

Function luaL_checkoption

src/Chain/libraries/glua/lauxlib.cpp:356–366  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

354*/
355
356LUALIB_API int luaL_checkoption(lua_State *L, int arg, const char *def,
357 const char *const lst[]) {
358 const char *name = (def) ? luaL_optstring(L, arg, def) :
359 luaL_checkstring(L, arg);
360 int i;
361 for (i = 0; lst[i]; i++)
362 if (strcmp(lst[i], name) == 0)
363 return i;
364 return luaL_argerror(L, arg,
365 lua_pushfstring(L, "invalid option '%s'", name));
366}
367
368
369LUALIB_API void luaL_checkstack(lua_State *L, int space, const char *msg) {

Callers 4

os_setlocaleFunction · 0.85
f_seekFunction · 0.85
f_setvbufFunction · 0.85
luaB_collectgarbageFunction · 0.85

Calls 2

luaL_argerrorFunction · 0.85
lua_pushfstringFunction · 0.85

Tested by

no test coverage detected