diff options
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 11 |
1 files changed, 7 insertions, 4 deletions
| @@ -1,5 +1,5 @@ | |||
| 1 | /* | 1 | /* |
| 2 | ** $Id: ldo.c,v 1.26 1998/06/15 21:34:14 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.27 1998/06/19 18:47:06 roberto Exp roberto $ |
| 3 | ** Stack and Call structure of Lua | 3 | ** Stack and Call structure of Lua |
| 4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
| 5 | */ | 5 | */ |
| @@ -172,11 +172,10 @@ static StkId callCclosure (struct Closure *cl, lua_CFunction f, StkId base) | |||
| 172 | } | 172 | } |
| 173 | 173 | ||
| 174 | 174 | ||
| 175 | void luaD_callTM (TObject *f, int nParams, int nResults) | 175 | void luaD_callTM (TObject *f, int nParams, int nResults) { |
| 176 | { | ||
| 177 | luaD_openstack(nParams); | 176 | luaD_openstack(nParams); |
| 178 | *(L->stack.top-nParams-1) = *f; | 177 | *(L->stack.top-nParams-1) = *f; |
| 179 | luaD_call((L->stack.top-L->stack.stack)-nParams, nResults); | 178 | luaD_calln(nParams, nResults); |
| 180 | } | 179 | } |
| 181 | 180 | ||
| 182 | 181 | ||
| @@ -230,6 +229,10 @@ void luaD_call (StkId base, int nResults) | |||
| 230 | } | 229 | } |
| 231 | 230 | ||
| 232 | 231 | ||
| 232 | void luaD_calln (int nArgs, int nResults) { | ||
| 233 | luaD_call((L->stack.top-L->stack.stack)-nArgs, nResults); | ||
| 234 | } | ||
| 235 | |||
| 233 | 236 | ||
| 234 | /* | 237 | /* |
| 235 | ** Traverse all objects on L->stack.stack | 238 | ** Traverse all objects on L->stack.stack |
