** 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'. */
| 98 | ** is a string, as it was either generated by Lua or by 'msghandler'. |
| 99 | */ |
| 100 | static int report(lua_State *L, int status) { |
| 101 | if (status != LUA_OK) { |
| 102 | const char *msg = lua_tostring(L, -1); |
| 103 | ll_message(L, progname, msg); |
| 104 | lua_pop(L, 1); /* remove message */ |
| 105 | } |
| 106 | return status; |
| 107 | } |
| 108 | |
| 109 | static int dochunk(lua_State *L, int status) { |
| 110 | if (status == LUA_OK) status = docall(L, 0, 0); |
no test coverage detected