| 384 | |
| 385 | |
| 386 | static const char *findfile (lua_State *L, const char *name, |
| 387 | const char *pname, |
| 388 | const char *dirsep) { |
| 389 | const char *path; |
| 390 | lua_getfield(L, lua_upvalueindex(1), pname); |
| 391 | path = lua_tostring(L, -1); |
| 392 | if (path == NULL) |
| 393 | luaL_error(L, LUA_QL("package.%s") " must be a string", pname); |
| 394 | return searchpath(L, name, path, ".", dirsep); |
| 395 | } |
| 396 | |
| 397 | |
| 398 | static int checkload (lua_State *L, int stat, const char *filename) { |
no test coverage detected