| 438 | |
| 439 | |
| 440 | static const char *findfile(lua_State *L, const char *name, |
| 441 | const char *pname, |
| 442 | const char *dirsep) { |
| 443 | const char *path; |
| 444 | lua_getfield(L, lua_upvalueindex(1), pname); |
| 445 | path = lua_tostring(L, -1); |
| 446 | if (path == nullptr) |
| 447 | luaL_error(L, "'package.%s' must be a string", pname); |
| 448 | return searchpath(L, name, path, ".", dirsep); |
| 449 | } |
| 450 | |
| 451 | |
| 452 | static int checkload(lua_State *L, int stat, const char *filename) { |
no test coverage detected