| 589 | |
| 590 | |
| 591 | static int errfile (lua_State *L, const char *what, int fnameindex) { |
| 592 | const char *serr = strerror(errno); |
| 593 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 594 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 595 | lua_remove(L, fnameindex); |
| 596 | return LUA_ERRFILE; |
| 597 | } |
| 598 | |
| 599 | |
| 600 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { |
no test coverage detected