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

Function searcher_C

depends/lua/src/loadlib.c:530–535  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

528
529
530static int searcher_C (lua_State *L) {
531 const char *name = luaL_checkstring(L, 1);
532 const char *filename = findfile(L, name, "cpath", LUA_CSUBSEP);
533 if (filename == NULL) return 1; /* module not found in this path */
534 return checkload(L, (loadfunc(L, filename, name) == 0), filename);
535}
536
537
538static int searcher_Croot (lua_State *L) {

Callers

nothing calls this directly

Calls 3

findfileFunction · 0.85
checkloadFunction · 0.85
loadfuncFunction · 0.85

Tested by

no test coverage detected