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

Function ll_searchpath

depends/lua/src/loadlib.c:458–469  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

456
457
458static int ll_searchpath (lua_State *L) {
459 const char *f = searchpath(L, luaL_checkstring(L, 1),
460 luaL_checkstring(L, 2),
461 luaL_optstring(L, 3, "."),
462 luaL_optstring(L, 4, LUA_DIRSEP));
463 if (f != NULL) return 1;
464 else { /* error message is on top of the stack */
465 lua_pushnil(L);
466 lua_insert(L, -2);
467 return 2; /* return nil + error message */
468 }
469}
470
471
472static const char *findfile (lua_State *L, const char *name,

Callers

nothing calls this directly

Calls 2

searchpathFunction · 0.85
lua_pushnilFunction · 0.85

Tested by

no test coverage detected