summaryrefslogtreecommitdiff
path: root/src/ldebug.c
diff options
context:
space:
mode:
authorPeter Drahoš <drahosp@gmail.com>2015-12-16 00:14:02 +0100
committerPeter Drahoš <drahosp@gmail.com>2015-12-16 00:14:02 +0100
commitfcdc5efb13f0d6c03d2868b7476b73e63a291ed3 (patch)
tree5bd844d3ae48e03d1aac8ebef3dd6209549d246e /src/ldebug.c
parent94f9f6c6ed0fbc1b49ab4a896d6a587ce8815e36 (diff)
downloadlua-5.3.tar.gz
Updated to lua-5.3.25.3.2lua-5.3
Diffstat (limited to 'src/ldebug.c')
-rw-r--r--src/ldebug.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/ldebug.c b/src/ldebug.c
index f76582c..9bd86d0 100644
--- a/src/ldebug.c
+++ b/src/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 2.115 2015/05/22 17:45:56 roberto Exp $
+** $Id: ldebug.c,v 2.117 2015/11/02 18:48:07 roberto Exp $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -618,7 +618,7 @@ l_noret luaG_errormsg (lua_State *L) {
setobjs2s(L, L->top, L->top - 1); /* move argument */
setobjs2s(L, L->top - 1, errfunc); /* push function */
L->top++; /* assume EXTRA_STACK */
- luaD_call(L, L->top - 2, 1, 0); /* call it */
+ luaD_callnoyield(L, L->top - 2, 1); /* call it */
}
luaD_throw(L, LUA_ERRRUN);
}
@@ -640,9 +640,11 @@ l_noret luaG_runerror (lua_State *L, const char *fmt, ...) {
void luaG_traceexec (lua_State *L) {
CallInfo *ci = L->ci;
lu_byte mask = L->hookmask;
- int counthook = ((mask & LUA_MASKCOUNT) && L->hookcount == 0);
+ int counthook = (--L->hookcount == 0 && (mask & LUA_MASKCOUNT));
if (counthook)
resethookcount(L); /* reset count */
+ else if (!(mask & LUA_MASKLINE))
+ return; /* no line hook and count != 0; nothing to be done */
if (ci->callstatus & CIST_HOOKYIELD) { /* called hook last time? */
ci->callstatus &= ~CIST_HOOKYIELD; /* erase mark */
return; /* do not call hook again (VM yielded, so it did not move) */