diff options
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.132 2017/10/04 21:56:32 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.133 2017/10/31 17:14:02 roberto Exp roberto $ |
3 | ** Debug Interface | 3 | ** Debug Interface |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -116,7 +116,7 @@ static void swapextra (lua_State *L) { | |||
116 | if (L->status == LUA_YIELD) { | 116 | if (L->status == LUA_YIELD) { |
117 | CallInfo *ci = L->ci; /* get function that yielded */ | 117 | CallInfo *ci = L->ci; /* get function that yielded */ |
118 | StkId temp = ci->func; /* exchange its 'func' and 'extra' values */ | 118 | StkId temp = ci->func; /* exchange its 'func' and 'extra' values */ |
119 | ci->func = restorestack(L, ci->extra); | 119 | L->func = ci->func = restorestack(L, ci->extra); |
120 | ci->extra = savestack(L, temp); | 120 | ci->extra = savestack(L, temp); |
121 | } | 121 | } |
122 | } | 122 | } |
@@ -661,7 +661,7 @@ static const char *varinfo (lua_State *L, const TValue *o) { | |||
661 | kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ | 661 | kind = getupvalname(ci, o, &name); /* check whether 'o' is an upvalue */ |
662 | if (!kind && isinstack(L, o)) /* no? try a register */ | 662 | if (!kind && isinstack(L, o)) /* no? try a register */ |
663 | kind = getobjname(ci_func(ci)->p, currentpc(ci), | 663 | kind = getobjname(ci_func(ci)->p, currentpc(ci), |
664 | cast_int(cast(StkId, o) - (ci->func + 1)), &name); | 664 | cast_int(cast(StkId, o) - (L->func + 1)), &name); |
665 | } | 665 | } |
666 | return (kind) ? luaO_pushfstring(L, " (%s '%s')", kind, name) : ""; | 666 | return (kind) ? luaO_pushfstring(L, " (%s '%s')", kind, name) : ""; |
667 | } | 667 | } |
@@ -790,7 +790,7 @@ void luaG_traceexec (lua_State *L) { | |||
790 | L->hookcount = 1; /* undo decrement to zero */ | 790 | L->hookcount = 1; /* undo decrement to zero */ |
791 | ci->u.l.savedpc--; /* undo increment (resume will increment it again) */ | 791 | ci->u.l.savedpc--; /* undo increment (resume will increment it again) */ |
792 | ci->callstatus |= CIST_HOOKYIELD; /* mark that it yielded */ | 792 | ci->callstatus |= CIST_HOOKYIELD; /* mark that it yielded */ |
793 | ci->func = L->top - 1; /* protect stack below results */ | 793 | L->func = ci->func = L->top - 1; /* protect stack below results */ |
794 | luaD_throw(L, LUA_YIELD); | 794 | luaD_throw(L, LUA_YIELD); |
795 | } | 795 | } |
796 | } | 796 | } |