| 493 | |
| 494 | |
| 495 | static int searcher_Lua (lua_State *L) { |
| 496 | const char *filename; |
| 497 | const char *name = luaL_checkstring(L, 1); |
| 498 | filename = findfile(L, name, "path", LUA_LSUBSEP); |
| 499 | if (filename == NULL) return 1; /* module not found in this path */ |
| 500 | return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename); |
| 501 | } |
| 502 | |
| 503 | |
| 504 | /* |
nothing calls this directly
no test coverage detected