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

Function searcher_Lua

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

Source from the content-addressed store, hash-verified

543
544
545static int searcher_Lua (lua_State *L) {
546 const char *filename;
547 const char *name = luaL_checkstring(L, 1);
548 filename = findfile(L, name, "path", LUA_LSUBSEP);
549 if (filename == NULL) return 1; /* module not found in this path */
550 return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename);
551}
552
553
554/*

Callers

nothing calls this directly

Calls 2

findfileFunction · 0.85
checkloadFunction · 0.85

Tested by

no test coverage detected