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

Function findfile

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

Source from the content-addressed store, hash-verified

438
439
440static const char *findfile(lua_State *L, const char *name,
441 const char *pname,
442 const char *dirsep) {
443 const char *path;
444 lua_getfield(L, lua_upvalueindex(1), pname);
445 path = lua_tostring(L, -1);
446 if (path == nullptr)
447 luaL_error(L, "'package.%s' must be a string", pname);
448 return searchpath(L, name, path, ".", dirsep);
449}
450
451
452static int checkload(lua_State *L, int stat, const char *filename) {

Callers 3

searcher_LuaFunction · 0.85
searcher_CFunction · 0.85
searcher_CrootFunction · 0.85

Calls 3

lua_getfieldFunction · 0.85
luaL_errorFunction · 0.85
searchpathFunction · 0.85

Tested by

no test coverage detected