MCPcopy Create free account
hub / github.com/crownengine/crown / luaL_checkoption

Function luaL_checkoption

3rdparty/luajit/src/lj_api.c:563–574  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

561}
562
563LUALIB_API int luaL_checkoption(lua_State *L, int idx, const char *def,
564 const char *const lst[])
565{
566 ptrdiff_t i;
567 const char *s = lua_tolstring(L, idx, NULL);
568 if (s == NULL && (s = def) == NULL)
569 lj_err_argt(L, idx, LUA_TSTRING);
570 for (i = 0; lst[i]; i++)
571 if (strcmp(lst[i], s) == 0)
572 return (int)i;
573 lj_err_argv(L, idx, LJ_ERR_INVOPTM, s);
574}
575
576LUA_API size_t lua_objlen(lua_State *L, int idx)
577{

Callers

nothing calls this directly

Calls 4

lj_err_argtFunction · 0.85
strcmpFunction · 0.85
lj_err_argvFunction · 0.85
lua_tolstringFunction · 0.70

Tested by

no test coverage detected