| 566 | |
| 567 | |
| 568 | static int errfile (lua_State *L, const char *what, int fnameindex) { |
| 569 | const char *serr = strerror(errno); |
| 570 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 571 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 572 | lua_remove(L, fnameindex); |
| 573 | return LUA_ERRFILE; |
| 574 | } |
| 575 | |
| 576 | |
| 577 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { |
no test coverage detected