MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / searcher_preload

Function searcher_preload

extlibs/lua/src/loadlib.c:603–614  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

601
602
603static int searcher_preload (lua_State *L) {
604 const char *name = luaL_checkstring(L, 1);
605 lua_getfield(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE);
606 if (lua_getfield(L, -1, name) == LUA_TNIL) { /* not found? */
607 lua_pushfstring(L, "no field package.preload['%s']", name);
608 return 1;
609 }
610 else {
611 lua_pushliteral(L, ":preload:");
612 return 2;
613 }
614}
615
616
617static void findloader (lua_State *L, const char *name) {

Callers

nothing calls this directly

Calls 2

lua_getfieldFunction · 0.85
lua_pushfstringFunction · 0.85

Tested by

no test coverage detected