diff options
| author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-05 10:41:29 -0300 |
|---|---|---|
| committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2005-04-05 10:41:29 -0300 |
| commit | 7b6c3b463e835f4accd344e1de44a92e1c5dde62 (patch) | |
| tree | c7f380b508672b0b388b173d882a8ed1a04d8419 /ldebug.c | |
| parent | 0316308c0d8ee9834641dacf81b43bcfd396095d (diff) | |
| download | lua-7b6c3b463e835f4accd344e1de44a92e1c5dde62.tar.gz lua-7b6c3b463e835f4accd344e1de44a92e1c5dde62.tar.bz2 lua-7b6c3b463e835f4accd344e1de44a92e1c5dde62.zip | |
small optimizations
Diffstat (limited to 'ldebug.c')
| -rw-r--r-- | ldebug.c | 5 |
1 files changed, 3 insertions, 2 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldebug.c,v 2.12 2004/12/20 15:50:00 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.13 2005/04/04 18:12:51 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,8 +34,9 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); | |||
| 34 | 34 | ||
| 35 | 35 | ||
| 36 | static int currentpc (lua_State *L, CallInfo *ci) { | 36 | static int currentpc (lua_State *L, CallInfo *ci) { |
| 37 | UNUSED(L); | ||
| 38 | if (!isLua(ci)) return -1; /* function is not a Lua function? */ | 37 | if (!isLua(ci)) return -1; /* function is not a Lua function? */ |
| 38 | if (ci == L->ci) | ||
| 39 | ci->savedpc = L->savedpc; | ||
| 39 | return pcRel(ci->savedpc, ci_func(ci)->l.p); | 40 | return pcRel(ci->savedpc, ci_func(ci)->l.p); |
| 40 | } | 41 | } |
| 41 | 42 | ||
