diff options
Diffstat (limited to 'ldo.c')
-rw-r--r-- | ldo.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: ldo.c,v 1.75 2000/05/09 14:50:16 roberto Exp roberto $ | 2 | ** $Id: ldo.c,v 1.76 2000/05/24 13:54:49 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 | */ |
@@ -139,7 +139,7 @@ static void luaD_callHook (lua_State *L, StkId func, lua_Hook callhook, | |||
139 | 139 | ||
140 | 140 | ||
141 | static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) { | 141 | static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) { |
142 | int nup = cl->nelems; /* number of upvalues */ | 142 | int nup = cl->nupvalues; /* number of upvalues */ |
143 | int numarg = L->top-base; | 143 | int numarg = L->top-base; |
144 | struct C_Lua_Stack oldCLS = L->Cstack; | 144 | struct C_Lua_Stack oldCLS = L->Cstack; |
145 | StkId firstResult; | 145 | StkId firstResult; |
@@ -151,7 +151,7 @@ static StkId callCclosure (lua_State *L, const struct Closure *cl, StkId base) { | |||
151 | L->top += nup; | 151 | L->top += nup; |
152 | numarg += nup; | 152 | numarg += nup; |
153 | /* copy upvalues into stack */ | 153 | /* copy upvalues into stack */ |
154 | while (nup--) *(base+nup) = cl->consts[nup]; | 154 | while (nup--) *(base+nup) = cl->upvalue[nup]; |
155 | } | 155 | } |
156 | L->Cstack.num = numarg; | 156 | L->Cstack.num = numarg; |
157 | L->Cstack.lua2C = base; | 157 | L->Cstack.lua2C = base; |