** Check whether 'status' is not OK and, if so, prints the error ** message on the top of the stack. It assumes that the error object ** is a string, as it was either generated by Lua or by 'msghandler'. */
| 118 | ** is a string, as it was either generated by Lua or by 'msghandler'. |
| 119 | */ |
| 120 | static int report (lua_State *L, int status) { |
| 121 | if (status != LUA_OK) { |
| 122 | const char *msg = lua_tostring(L, -1); |
| 123 | l_message(progname, msg); |
| 124 | lua_pop(L, 1); /* remove message */ |
| 125 | } |
| 126 | return status; |
| 127 | } |
| 128 | |
| 129 | |
| 130 | /* |