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

Function searcher_Lua

src/Chain/libraries/glua/loadlib.cpp:463–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

461
462
463static int searcher_Lua(lua_State *L) {
464 const char *filename;
465 const char *name = luaL_checkstring(L, 1);
466 filename = findfile(L, name, "path", LUA_LSUBSEP);
467 if (filename == nullptr) return 1; /* module not found in this path */
468 return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename);
469}
470
471/**
472 * module searcher from thinkyoung api

Callers

nothing calls this directly

Calls 2

findfileFunction · 0.85
checkloadFunction · 0.85

Tested by

no test coverage detected