aboutsummaryrefslogtreecommitdiff
path: root/ldebug.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-05-31 15:51:50 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2004-05-31 15:51:50 -0300
commit616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59 (patch)
tree78322d820e3af1ca6645ed08eaa65a8f0aa04fec /ldebug.c
parent47eda6ebd83785908ac26f8dd06dff36a7d42664 (diff)
downloadlua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.tar.gz
lua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.tar.bz2
lua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.zip
new way to use `vararg' parameters (with `...')
Diffstat (limited to 'ldebug.c')
-rw-r--r--ldebug.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/ldebug.c b/ldebug.c
index 3a1509f0..044eb57f 100644
--- a/ldebug.c
+++ b/ldebug.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: ldebug.c,v 2.3 2004/03/23 13:10:16 roberto Exp roberto $ 2** $Id: ldebug.c,v 2.4 2004/04/30 20:13:38 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*/
@@ -221,8 +221,8 @@ LUA_API int lua_getinfo (lua_State *L, const char *what, lua_Debug *ar) {
221 } 221 }
222 else if (ar->i_ci != 0) { /* no tail call? */ 222 else if (ar->i_ci != 0) { /* no tail call? */
223 CallInfo *ci = L->base_ci + ar->i_ci; 223 CallInfo *ci = L->base_ci + ar->i_ci;
224 lua_assert(ttisfunction(ci->base - 1)); 224 lua_assert(ttisfunction(ci->func));
225 status = auxgetinfo(L, what, ar, ci->base - 1, ci); 225 status = auxgetinfo(L, what, ar, ci->func, ci);
226 } 226 }
227 else 227 else
228 info_tailcall(L, ar); 228 info_tailcall(L, ar);
@@ -405,6 +405,13 @@ static Instruction luaG_symbexec (const Proto *pt, int lastpc, int reg) {
405 } 405 }
406 break; 406 break;
407 } 407 }
408 case OP_VARARG: {
409 check(pt->is_vararg & NEWSTYLEVARARG);
410 b--;
411 if (b == LUA_MULTRET) check(checkopenop(pt, pc));
412 checkreg(pt, a+b-1);
413 break;
414 }
408 default: break; 415 default: break;
409 } 416 }
410 } 417 }