MCPcopy Create free account
hub / github.com/crownengine/crown / lj_cf_package_loader_lua

Function lj_cf_package_loader_lua

3rdparty/luajit/src/lib_package.c:370–379  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

368}
369
370static int lj_cf_package_loader_lua(lua_State *L)
371{
372 const char *filename;
373 const char *name = luaL_checkstring(L, 1);
374 filename = findfile(L, name, "path");
375 if (filename == NULL) return 1; /* library not found in this path */
376 if (luaL_loadfile(L, filename) != 0)
377 loaderror(L, filename);
378 return 1; /* library loaded successfully */
379}
380
381static int lj_cf_package_loader_c(lua_State *L)
382{

Callers

nothing calls this directly

Calls 3

findfileFunction · 0.70
luaL_loadfileFunction · 0.70
loaderrorFunction · 0.70

Tested by

no test coverage detected