MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / findfile

Function findfile

xrepo/packages/l/lua/port/lua/src/loadlib.c:522–531  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

520
521
522static const char *findfile (lua_State *L, const char *name,
523 const char *pname,
524 const char *dirsep) {
525 const char *path;
526 lua_getfield(L, lua_upvalueindex(1), pname);
527 path = lua_tostring(L, -1);
528 if (l_unlikely(path == NULL))
529 luaL_error(L, "'package.%s' must be a string", pname);
530 return searchpath(L, name, path, ".", dirsep);
531}
532
533
534static 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

luaL_errorFunction · 0.85
searchpathFunction · 0.85
lua_getfieldFunction · 0.70

Tested by

no test coverage detected