diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-06 12:42:35 -0200 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2010-01-06 12:42:35 -0200 |
commit | 5bcfe0c700c1001b7e94e76214be12249bc051c7 (patch) | |
tree | 379ed7cff18969f613decaf6f8442ebee5eb9590 /ldebug.c | |
parent | 8cd395564c9b547e2ded1d4eb67654effcb86494 (diff) | |
download | lua-5bcfe0c700c1001b7e94e76214be12249bc051c7.tar.gz lua-5bcfe0c700c1001b7e94e76214be12249bc051c7.tar.bz2 lua-5bcfe0c700c1001b7e94e76214be12249bc051c7.zip |
new debug info 'isvararg' and 'nparams'
Diffstat (limited to 'ldebug.c')
-rw-r--r-- | ldebug.c | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldebug.c,v 2.59 2009/11/26 15:34:15 roberto Exp roberto $ | 2 | ** $Id: ldebug.c,v 2.60 2009/12/01 16:31:04 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 | */ |
@@ -192,6 +192,14 @@ static int auxgetinfo (lua_State *L, const char *what, lua_Debug *ar, | |||
192 | } | 192 | } |
193 | case 'u': { | 193 | case 'u': { |
194 | ar->nups = f->c.nupvalues; | 194 | ar->nups = f->c.nupvalues; |
195 | if (f->c.isC) { | ||
196 | ar->isvararg = 1; | ||
197 | ar->nparams = 0; | ||
198 | } | ||
199 | else { | ||
200 | ar->isvararg = f->l.p->is_vararg; | ||
201 | ar->nparams = f->l.p->numparams; | ||
202 | } | ||
195 | break; | 203 | break; |
196 | } | 204 | } |
197 | case 't': { | 205 | case 't': { |