aboutsummaryrefslogtreecommitdiff
path: root/ldo.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-07-12 13:14:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>1998-07-12 13:14:34 -0300
commitee912e5a7f090314915be7b354be5bfa1002ed79 (patch)
treef7492fd78812f605d6d8a863319cdf982aeae1de /ldo.c
parentad446a0eb06f570f826fd313f5ed225b04e3719a (diff)
downloadlua-ee912e5a7f090314915be7b354be5bfa1002ed79.tar.gz
lua-ee912e5a7f090314915be7b354be5bfa1002ed79.tar.bz2
lua-ee912e5a7f090314915be7b354be5bfa1002ed79.zip
auxiliar function "luaD_calln".
Diffstat (limited to 'ldo.c')
-rw-r--r--ldo.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/ldo.c b/ldo.c
index 116d6eb0..20b769d8 100644
--- a/ldo.c
+++ b/ldo.c
@@ -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
175void luaD_callTM (TObject *f, int nParams, int nResults) 175void 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
232void 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