** 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 Glua or by 'msghandler'. */
| 108 | ** is a string, as it was either generated by Glua or by 'msghandler'. |
| 109 | */ |
| 110 | static int report(lua_State *L, int status) { |
| 111 | if (status != LUA_OK) { |
| 112 | const char *msg = lua_tostring(L, -1); |
| 113 | l_message(progname, msg); |
| 114 | lua_pop(L, 1); /* remove message */ |
| 115 | } |
| 116 | return status; |
| 117 | } |
| 118 | |
| 119 | |
| 120 | /* |