diff options
| -rw-r--r-- | lua.c | 4 |
1 files changed, 3 insertions, 1 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: lua.c,v 1.151 2005/10/14 18:15:46 roberto Exp roberto $ | 2 | ** $Id: lua.c,v 1.152 2005/10/14 18:34:23 roberto Exp roberto $ |
| 3 | ** Lua stand-alone interpreter | 3 | ** Lua stand-alone interpreter |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -100,6 +100,8 @@ static int docall (lua_State *L, int narg, int clear) { | |||
| 100 | status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); | 100 | status = lua_pcall(L, narg, (clear ? 0 : LUA_MULTRET), base); |
| 101 | signal(SIGINT, SIG_DFL); | 101 | signal(SIGINT, SIG_DFL); |
| 102 | lua_remove(L, base); /* remove traceback function */ | 102 | lua_remove(L, base); /* remove traceback function */ |
| 103 | /* force a complete garbage collection in case of errors */ | ||
| 104 | if (status != 0) lua_gc(L, LUA_GCCOLLECT, 0); | ||
| 103 | return status; | 105 | return status; |
| 104 | } | 106 | } |
| 105 | 107 | ||
