MCPcopy Create free account
hub / github.com/Achain-Dev/Achain / ll_searchpath

Function ll_searchpath

src/Chain/libraries/glua/loadlib.cpp:426–437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

424
425
426static int ll_searchpath(lua_State *L) {
427 const char *f = searchpath(L, luaL_checkstring(L, 1),
428 luaL_checkstring(L, 2),
429 luaL_optstring(L, 3, "."),
430 luaL_optstring(L, 4, LUA_DIRSEP));
431 if (f != nullptr) return 1;
432 else { /* error message is on top of the stack */
433 lua_pushnil(L);
434 lua_insert(L, -2);
435 return 2; /* return nil + error message */
436 }
437}
438
439
440static 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