MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / ll_searchpath

Function ll_searchpath

extlibs/lua/src/loadlib.c:501–512  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

499
500
501static int ll_searchpath (lua_State *L) {
502 const char *f = searchpath(L, luaL_checkstring(L, 1),
503 luaL_checkstring(L, 2),
504 luaL_optstring(L, 3, "."),
505 luaL_optstring(L, 4, LUA_DIRSEP));
506 if (f != NULL) return 1;
507 else { /* error message is on top of the stack */
508 luaL_pushfail(L);
509 lua_insert(L, -2);
510 return 2; /* return fail + error message */
511 }
512}
513
514
515static const char *findfile (lua_State *L, const char *name,

Callers

nothing calls this directly

Calls 1

searchpathFunction · 0.85

Tested by

no test coverage detected