From 1817dfc3016efc09cfa2c7aee06b22fe1d130652 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Wed, 4 Mar 2009 10:32:29 -0300 Subject: initial separation, in CallInfo, of what is relevant only to Lua functions or only to C functions --- ldebug.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'ldebug.c') diff --git a/ldebug.c b/ldebug.c index aecb2f8d..6148cfcf 100644 --- a/ldebug.c +++ b/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.41 2008/08/26 13:27:42 roberto Exp roberto $ +** $Id: ldebug.c,v 2.42 2008/10/30 15:39:30 roberto Exp roberto $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -89,7 +89,7 @@ LUA_API int lua_getstack (lua_State *L, int level, lua_Debug *ar) { for (ci = L->ci; level > 0 && ci > L->base_ci; ci--) { level--; if (isLua(ci)) /* Lua function? */ - level -= ci->tailcalls; /* skip lost tail calls */ + level -= ci->u.l.tailcalls; /* skip lost tail calls */ } if (level == 0 && ci > L->base_ci) { /* level found? */ status = 1; @@ -527,7 +527,7 @@ static const char *getobjname (lua_State *L, CallInfo *ci, int stackpos, static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name) { TMS tm = 0; Instruction i; - if ((isLua(ci) && ci->tailcalls > 0) || !isLua(ci - 1)) + if ((isLua(ci) && ci->u.l.tailcalls > 0) || !isLua(ci - 1)) return NULL; /* calling function is not Lua (or is unknown) */ ci--; /* calling function */ i = ci_func(ci)->l.p->code[currentpc(L, ci)]; -- cgit v1.2.3-55-g6feb