| 43 | } |
| 44 | |
| 45 | static int finalize(lua_State *L) { |
| 46 | if (!lua_toboolean(L, 1)) { |
| 47 | lua_pushvalue(L, lua_upvalueindex(2)); |
| 48 | lua_call(L, 0, 0); |
| 49 | lua_settop(L, 2); |
| 50 | wrap(L); |
| 51 | lua_error(L); |
| 52 | return 0; |
| 53 | } else return lua_gettop(L); |
| 54 | } |
| 55 | |
| 56 | static int do_nothing(lua_State *L) { |
| 57 | (void) L; |
nothing calls this directly
no test coverage detected