| 456 | |
| 457 | |
| 458 | static int ll_searchpath (lua_State *L) { |
| 459 | const char *f = searchpath(L, luaL_checkstring(L, 1), |
| 460 | luaL_checkstring(L, 2), |
| 461 | luaL_optstring(L, 3, "."), |
| 462 | luaL_optstring(L, 4, LUA_DIRSEP)); |
| 463 | if (f != NULL) return 1; |
| 464 | else { /* error message is on top of the stack */ |
| 465 | lua_pushnil(L); |
| 466 | lua_insert(L, -2); |
| 467 | return 2; /* return nil + error message */ |
| 468 | } |
| 469 | } |
| 470 | |
| 471 | |
| 472 | static const char *findfile (lua_State *L, const char *name, |
nothing calls this directly
no test coverage detected