summaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-04-17 19:00:01 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2009-04-17 19:00:01 -0300
commitd3037d97ec192e7719de485f15dacb473bf96528 (patch)
treeea9f837cc64d9df82ae4324f2c7ea447b5c4582f /ldebug.c
parentc6b442bd369ce05b3d4bfb95ba64451521aa1b31 (diff)
downloadlua-github-d3037d97ec192e7719de485f15dacb473bf96528.tar.gz
several small improvements based on 'ci' being fixed now (including
erasing savedpc from lua_State)
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/ldebug.c b/ldebug.c
index bcb7eaf3..629d040b 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
/*
-** $Id: ldebug.c,v 2.45 2009/03/26 12:56:38 roberto Exp roberto $
+** $Id: ldebug.c,v 2.46 2009/04/17 14:28:06 roberto Exp roberto $
** Debug Interface
** See Copyright Notice in lua.h
*/
@@ -35,9 +35,7 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name);
static int currentpc (lua_State *L, CallInfo *ci) {
if (!isLua(ci)) return -1; /* function is not a Lua function? */
- if (ci == L->ci)
- ci->savedpc = L->savedpc;
- return pcRel(ci->savedpc, ci_func(ci)->l.p);
+ return pcRel(ci->u.l.savedpc, ci_func(ci)->l.p);
}
@@ -58,7 +56,7 @@ LUA_API int lua_sethook (lua_State *L, lua_Hook func, int mask, int count) {
mask = 0;
func = NULL;
}
- L->oldpc = L->savedpc;
+ L->oldpc = NULL;
L->hook = func;
L->basehookcount = count;
resethookcount(L);