MCPcopy Create free account
hub / github.com/F-Stack/f-stack / loader_preload

Function loader_preload

app/redis-6.2.6/deps/lua/src/loadlib.c:435–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

433
434
435static int loader_preload (lua_State *L) {
436 const char *name = luaL_checkstring(L, 1);
437 lua_getfield(L, LUA_ENVIRONINDEX, "preload");
438 if (!lua_istable(L, -1))
439 luaL_error(L, LUA_QL("package.preload") " must be a table");
440 lua_getfield(L, -1, name);
441 if (lua_isnil(L, -1)) /* not found? */
442 lua_pushfstring(L, "\n\tno field package.preload['%s']", name);
443 return 1;
444}
445
446
447static 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