MCPcopy Create free account
hub / github.com/DFHack/dfhack / searcher_Lua

Function searcher_Lua

depends/lua/src/loadlib.c:495–501  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

493
494
495static int searcher_Lua (lua_State *L) {
496 const char *filename;
497 const char *name = luaL_checkstring(L, 1);
498 filename = findfile(L, name, "path", LUA_LSUBSEP);
499 if (filename == NULL) return 1; /* module not found in this path */
500 return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename);
501}
502
503
504/*

Callers

nothing calls this directly

Calls 2

findfileFunction · 0.85
checkloadFunction · 0.85

Tested by

no test coverage detected