| 541 | |
| 542 | |
| 543 | static int errfile (lua_State *L, const char *what, int fnameindex) { |
| 544 | const char *serr = strerror(errno); |
| 545 | const char *filename = lua_tostring(L, fnameindex) + 1; |
| 546 | lua_pushfstring(L, "cannot %s %s: %s", what, filename, serr); |
| 547 | lua_remove(L, fnameindex); |
| 548 | return LUA_ERRFILE; |
| 549 | } |
| 550 | |
| 551 | |
| 552 | LUALIB_API int luaL_loadfile (lua_State *L, const char *filename) { |
no test coverage detected