MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / ll_searchpath

Function ll_searchpath

third-party/lua-5.4.6/src/loadlib.c:499–510  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 2

searchpathFunction · 0.70
lua_insertFunction · 0.50

Tested by

no test coverage detected