diff options
| -rw-r--r-- | ldebug.c | 6 | ||||
| -rw-r--r-- | ldebug.h | 5 | ||||
| -rw-r--r-- | ltests.c | 4 |
3 files changed, 8 insertions, 7 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 2.111 2015/02/13 16:01:17 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.112 2015/03/06 19:49:50 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 | */ |
| @@ -34,6 +34,10 @@ | |||
| 34 | #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) | 34 | #define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) |
| 35 | 35 | ||
| 36 | 36 | ||
| 37 | /* Active Lua function (given call info) */ | ||
| 38 | #define ci_func(ci) (clLvalue((ci)->func)) | ||
| 39 | |||
| 40 | |||
| 37 | static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); | 41 | static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); |
| 38 | 42 | ||
| 39 | 43 | ||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.h,v 2.11 2014/02/25 14:31:16 roberto Exp roberto $ | 2 | ** $Id: ldebug.h,v 2.12 2014/11/10 14:46:05 roberto Exp roberto $ |
| 3 | ** Auxiliary functions from Debug Interface module | 3 | ** Auxiliary functions from Debug Interface module |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -17,9 +17,6 @@ | |||
| 17 | 17 | ||
| 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) | 18 | #define resethookcount(L) (L->hookcount = L->basehookcount) |
| 19 | 19 | ||
| 20 | /* Active Lua function (given call info) */ | ||
| 21 | #define ci_func(ci) (clLvalue((ci)->func)) | ||
| 22 | |||
| 23 | 20 | ||
| 24 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, | 21 | LUAI_FUNC l_noret luaG_typeerror (lua_State *L, const TValue *o, |
| 25 | const char *opname); | 22 | const char *opname); |
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ltests.c,v 2.201 2014/12/18 12:13:42 roberto Exp roberto $ | 2 | ** $Id: ltests.c,v 2.202 2015/01/16 16:54:37 roberto Exp roberto $ |
| 3 | ** Internal Module for Debugging of the Lua Implementation | 3 | ** Internal Module for Debugging of the Lua Implementation |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -291,7 +291,7 @@ static int lua_checkpc (lua_State *L, CallInfo *ci) { | |||
| 291 | else { | 291 | else { |
| 292 | Proto *p; | 292 | Proto *p; |
| 293 | if (L->status != LUA_YIELD || ci != L->ci) | 293 | if (L->status != LUA_YIELD || ci != L->ci) |
| 294 | p = ci_func(ci)->p; | 294 | p = clLvalue(ci->func)->p; |
| 295 | else /* real 'func' was saved in 'extra' field */ | 295 | else /* real 'func' was saved in 'extra' field */ |
| 296 | p = clLvalue(restorestack(L, ci->extra))->p; | 296 | p = clLvalue(restorestack(L, ci->extra))->p; |
| 297 | return p->code <= ci->u.l.savedpc && | 297 | return p->code <= ci->u.l.savedpc && |
