| 466 | |
| 467 | |
| 468 | static int searcher_preload (lua_State *L) { |
| 469 | const char *name = luaL_checkstring(L, 1); |
| 470 | lua_getfield(L, LUA_REGISTRYINDEX, "_PRELOAD"); |
| 471 | lua_getfield(L, -1, name); |
| 472 | if (lua_isnil(L, -1)) /* not found? */ |
| 473 | lua_pushfstring(L, "\n\tno field package.preload['%s']", name); |
| 474 | return 1; |
| 475 | } |
| 476 | |
| 477 | |
| 478 | static void findloader (lua_State *L, const char *name) { |
nothing calls this directly
no test coverage detected