MCPcopy Create free account
hub / github.com/BZFlag-Dev/bzflag / loader_preload

Function loader_preload

other_src/lua/src/loadlib.cpp:450–459  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448
449
450static int loader_preload (lua_State *L) {
451 const char *name = luaL_checkstring(L, 1);
452 lua_getfield(L, LUA_ENVIRONINDEX, "preload");
453 if (!lua_istable(L, -1))
454 luaL_error(L, LUA_QL("package.preload") " must be a table");
455 lua_getfield(L, -1, name);
456 if (lua_isnil(L, -1)) /* not found? */
457 lua_pushfstring(L, "\n\tno field package.preload['%s']", name);
458 return 1;
459}
460
461
462static const int sentinel_ = 0;

Callers

nothing calls this directly

Calls 3

lua_getfieldFunction · 0.70
luaL_errorFunction · 0.70
lua_pushfstringFunction · 0.70

Tested by

no test coverage detected