From 7b6c3b463e835f4accd344e1de44a92e1c5dde62 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Tue, 5 Apr 2005 10:41:29 -0300 Subject: small optimizations --- ldebug.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index 19a1453e..43c05e20 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.12 2004/12/20 15:50:00 roberto Exp roberto $ +** $Id: ldebug.c,v 2.13 2005/04/04 18:12:51 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -34,8 +34,9 @@ static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); static int currentpc (lua_State *L, CallInfo *ci) { - UNUSED(L); 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); } -- cgit v1.2.3-55-g6feb