diff options
author | Lua Team <team@lua.org> | 2012-03-21 12:00:00 +0000 |
---|---|---|
committer | repogen <> | 2012-03-21 12:00:00 +0000 |
commit | 1cb937cf2d4583482aadaff45b6628b39fdcd91e (patch) | |
tree | 614eba453350c41305e41d647e9e03d779314f89 /src/ldebug.c | |
parent | 6ee889a587f9b600b564d5c0ba0350faab0387cd (diff) | |
download | lua-github-5.2.1-work1.tar.gz |
Lua 5.2.1-work15.2.1-work1
Diffstat (limited to 'src/ldebug.c')
-rw-r--r-- | src/ldebug.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/src/ldebug.c b/src/ldebug.c index 31b7ae40..43f8f046 100644 --- a/src/ldebug.c +++ b/src/ldebug.c @@ -1,5 +1,5 @@ /* -** $Id: ldebug.c,v 2.88 2011/11/30 12:43:51 roberto Exp $ +** $Id: ldebug.c,v 2.89 2012/01/20 22:05:50 roberto Exp $ ** Debug Interface ** See Copyright Notice in lua.h */ @@ -30,6 +30,9 @@ +#define noLuaClosure(f) ((f) == NULL || (f)->c.tt == LUA_TCCL) + + static const char *getfuncname (lua_State *L, CallInfo *ci, const char **name); @@ -173,7 +176,7 @@ LUA_API const char *lua_setlocal (lua_State *L, const lua_Debug *ar, int n) { static void funcinfo (lua_Debug *ar, Closure *cl) { - if (cl == NULL || cl->c.isC) { + if (noLuaClosure(cl)) { ar->source = "=[C]"; ar->linedefined = -1; ar->lastlinedefined = -1; @@ -191,7 +194,7 @@ static void funcinfo (lua_Debug *ar, Closure *cl) { static void collectvalidlines (lua_State *L, Closure *f) { - if (f == NULL || f->c.isC) { + if (noLuaClosure(f)) { setnilvalue(L->top); incr_top(L); } @@ -210,7 +213,7 @@ static void collectvalidlines (lua_State *L, Closure *f) { static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, - Closure *f, CallInfo *ci) { + Closure *f, CallInfo *ci) { int status = 1; for (; *what; what++) { switch (*what) { @@ -224,7 +227,7 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, } case 'u': { ar->nups = (f == NULL) ? 0 : f->c.nupvalues; - if (f == NULL || f->c.isC) { + if (noLuaClosure(f)) { ar->isvararg = 1; ar->nparams = 0; } |