| 536 | |
| 537 | |
| 538 | static int searcher_Lua (lua_State *L) { |
| 539 | const char *filename; |
| 540 | const char *name = luaL_checkstring(L, 1); |
| 541 | filename = findfile(L, name, "path", LUA_LSUBSEP); |
| 542 | if (filename == NULL) return 1; /* module not found in this path */ |
| 543 | return checkload(L, (luaL_loadfile(L, filename) == LUA_OK), filename); |
| 544 | } |
| 545 | |
| 546 | |
| 547 | /* |