MCPcopy Create free account
hub / github.com/CppCXY/EmmyLuaCodeStyle / ll_searchpath

Function ll_searchpath

3rd/lua-5.4.3/src/loadlib.c:508–519  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

506
507
508static int ll_searchpath (lua_State *L) {
509 const char *f = searchpath(L, luaL_checkstring(L, 1),
510 luaL_checkstring(L, 2),
511 luaL_optstring(L, 3, "."),
512 luaL_optstring(L, 4, LUA_DIRSEP));
513 if (f != NULL) return 1;
514 else { /* error message is on top of the stack */
515 luaL_pushfail(L);
516 lua_insert(L, -2);
517 return 2; /* return fail + error message */
518 }
519}
520
521
522static 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