aboutsummaryrefslogtreecommitdiff
path: root/lapi.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-10 16:13:26 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2014-06-10 16:13:26 -0300
commit8b5940e7ca6a1233b81d850411261c22f2a7a657 (patch)
tree833b95be549940252c7b71408e978c903c16d2b1 /lapi.c
parent1a3656e56eb1c873a4d74661eb44c96c07d662c1 (diff)
downloadlua-8b5940e7ca6a1233b81d850411261c22f2a7a657.tar.gz
lua-8b5940e7ca6a1233b81d850411261c22f2a7a657.tar.bz2
lua-8b5940e7ca6a1233b81d850411261c22f2a7a657.zip
must also reset CIST_OAH if necessary (CallInfo is not a fresh one)
Diffstat (limited to 'lapi.c')
-rw-r--r--lapi.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/lapi.c b/lapi.c
index 36962cf3..f775b1df 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.215 2014/06/10 17:41:38 roberto Exp roberto $ 2** $Id: lapi.c,v 2.216 2014/06/10 18:51:21 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -970,10 +970,11 @@ LUA_API int lua_pcallk (lua_State *L, int nargs, int nresults, int errfunc,
970 ci->extra = savestack(L, c.func); 970 ci->extra = savestack(L, c.func);
971 ci->u.c.old_errfunc = L->errfunc; 971 ci->u.c.old_errfunc = L->errfunc;
972 L->errfunc = func; 972 L->errfunc = func;
973 if (L->allowhook) 973 if (L->allowhook) /* save original value of 'allowhook' */
974 ci->callstatus |= CIST_OAH; /* save original value of 'allowhook' */ 974 ci->callstatus |= CIST_OAH;
975 /* mark that function may do error recovery */ 975 else
976 ci->callstatus |= CIST_YPCALL; 976 ci->callstatus &= ~CIST_OAH;
977 ci->callstatus |= CIST_YPCALL; /* function can do error recovery */
977 luaD_call(L, c.func, nresults, 1); /* do the call */ 978 luaD_call(L, c.func, nresults, 1); /* do the call */
978 ci->callstatus &= ~CIST_YPCALL; 979 ci->callstatus &= ~CIST_YPCALL;
979 L->errfunc = ci->u.c.old_errfunc; 980 L->errfunc = ci->u.c.old_errfunc;