diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-31 15:51:50 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2004-05-31 15:51:50 -0300 |
commit | 616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59 (patch) | |
tree | 78322d820e3af1ca6645ed08eaa65a8f0aa04fec /lstate.h | |
parent | 47eda6ebd83785908ac26f8dd06dff36a7d42664 (diff) | |
download | lua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.tar.gz lua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.tar.bz2 lua-616438fe9ab5e3ae7d73e9ad838e9b7bdea1ea59.zip |
new way to use `vararg' parameters (with `...')
Diffstat (limited to 'lstate.h')
-rw-r--r-- | lstate.h | 9 |
1 files changed, 5 insertions, 4 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lstate.h,v 2.2 2004/03/23 17:02:58 roberto Exp roberto $ | 2 | ** $Id: lstate.h,v 2.3 2004/05/14 19:25:09 roberto Exp roberto $ |
3 | ** Global State | 3 | ** Global State |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -71,6 +71,7 @@ typedef struct stringtable { | |||
71 | */ | 71 | */ |
72 | typedef struct CallInfo { | 72 | typedef struct CallInfo { |
73 | StkId base; /* base for this function */ | 73 | StkId base; /* base for this function */ |
74 | StkId func; /* function index in the stack */ | ||
74 | StkId top; /* top for this function */ | 75 | StkId top; /* top for this function */ |
75 | int nresults; /* expected number of results from this function */ | 76 | int nresults; /* expected number of results from this function */ |
76 | union { | 77 | union { |
@@ -86,10 +87,10 @@ typedef struct CallInfo { | |||
86 | 87 | ||
87 | 88 | ||
88 | 89 | ||
89 | #define curr_func(L) (clvalue(L->base - 1)) | 90 | #define curr_func(L) (clvalue(L->ci->func)) |
90 | #define ci_func(ci) (clvalue((ci)->base - 1)) | 91 | #define ci_func(ci) (clvalue((ci)->func)) |
91 | #define f_isLua(ci) (!ci_func(ci)->c.isC) | 92 | #define f_isLua(ci) (!ci_func(ci)->c.isC) |
92 | #define isLua(ci) (ttisfunction((ci)->base - 1) && f_isLua(ci)) | 93 | #define isLua(ci) (ttisfunction((ci)->func) && f_isLua(ci)) |
93 | 94 | ||
94 | 95 | ||
95 | /* | 96 | /* |