diff --git a/ldebug.c b/ldebug.c index b51ae8b7..86ee7dae 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.111 2015/02/13 16:01:17 roberto Exp roberto $ +** $Id: ldebug.c,v 2.112 2015/03/06 19:49:50 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -34,6 +34,10 @@ #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) +/* Active Lua function (given call info) */ +#define ci_func(ci) (clLvalue((ci)->func)) + + static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); diff --git a/ldebug.h b/ldebug.h index 7fba153c..e44b3f78 100644 --- a/ldebug.h +++ b/ldebug.h @@ -1,5 +1,5 @@ /* -** $Id: ldebug.h,v 2.11 2014/02/25 14:31:16 roberto Exp roberto $ +** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 roberto Exp roberto $ ** Auxiliary functions from Debug Interface module ** See Copyright Notice in lua.h */ @@ -17,9 +17,6 @@ #define resethookcount(L) (L->hookcount = L->basehookcount) -/* Active Lua function (given call info) */ -#define ci_func(ci) (clLvalue((ci)->func)) - LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, const char *opname); diff --git a/ltests.c b/ltests.c index dadcad8d..858df9dd 100644 --- a/ltests.c +++ b/ltests.c @@ -1,5 +1,5 @@ /* -** $Id: ltests.c,v 2.201 2014/12/18 12:13:42 roberto Exp roberto $ +** $Id: ltests.c,v 2.202 2015/01/16 16:54:37 roberto Exp roberto $ ** Internal Module for Debugging of the Lua Implementation ** See Copyright Notice in lua.h */ @@ -291,7 +291,7 @@ static int lua_checkpc (lua_State *L, CallInfo *ci) { else { Proto *p; if (L->status != LUA_YIELD || ci != L->ci) - p = ci_func(ci)->p; + p = clLvalue(ci->func)->p; else /* real 'func' was saved in 'extra' field */ p = clLvalue(restorestack(L, ci->extra))->p; return p->code <= ci->u.l.savedpc &&