| 558 | |
| 559 | |
| 560 | static int searcher_preload (lua_State *L) { |
| 561 | const char *name = luaL_checkstring(L, 1); |
| 562 | lua_getfield(L, LUA_REGISTRYINDEX, LUA_PRELOAD_TABLE); |
| 563 | if (lua_getfield(L, -1, name) == LUA_TNIL) /* not found? */ |
| 564 | lua_pushfstring(L, "\n\tno field package.preload['%s']", name); |
| 565 | return 1; |
| 566 | } |
| 567 | |
| 568 | |
| 569 | static void findloader (lua_State *L, const char *name) { |
nothing calls this directly
no test coverage detected