Don't swallow errors in finalizers.

This commit is contained in:
Philipp Janda
2016-02-24 00:48:43 +01:00
parent 9ffd96724d
commit 9fe38c654f
3 changed files with 2 additions and 4 deletions

View File

@ -49,7 +49,7 @@ static void wrap(lua_State *L) {
static int finalize(lua_State *L) {
if (!lua_toboolean(L, 1)) {
lua_pushvalue(L, lua_upvalueindex(1));
lua_pcall(L, 0, 0, 0);
lua_call(L, 0, 0);
lua_settop(L, 2);
wrap(L);
lua_error(L);