aboutsummaryrefslogtreecommitdiff
path: root/ltm.c
diff options
context:
space:
mode:
Diffstat (limited to 'ltm.c')
-rw-r--r--ltm.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/ltm.c b/ltm.c
index f2a373f8..cfe90e30 100644
--- a/ltm.c
+++ b/ltm.c
@@ -262,7 +262,7 @@ static void buildhiddenargs (lua_State *L, CallInfo *ci, const Proto *p,
262 /* move fixed parameters to after the copied function */ 262 /* move fixed parameters to after the copied function */
263 for (i = 1; i <= nfixparams; i++) { 263 for (i = 1; i <= nfixparams; i++) {
264 setobjs2s(L, L->top.p++, ci->func.p + i); 264 setobjs2s(L, L->top.p++, ci->func.p + i);
265 setnilvalue(s2v(ci->func.p + i)); /* erase original parameter (for GC) */ 265 setnilvalue2s(ci->func.p + i); /* erase original parameter (for GC) */
266 } 266 }
267 ci->func.p += totalargs + 1; /* 'func' now lives after hidden arguments */ 267 ci->func.p += totalargs + 1; /* 'func' now lives after hidden arguments */
268 ci->top.p += totalargs + 1; 268 ci->top.p += totalargs + 1;
@@ -283,7 +283,7 @@ void luaT_adjustvarargs (lua_State *L, CallInfo *ci, const Proto *p) {
283 lua_assert(p->flag & PF_VAHID); 283 lua_assert(p->flag & PF_VAHID);
284 buildhiddenargs(L, ci, p, totalargs, nfixparams, nextra); 284 buildhiddenargs(L, ci, p, totalargs, nfixparams, nextra);
285 /* set vararg parameter to nil */ 285 /* set vararg parameter to nil */
286 setnilvalue(s2v(ci->func.p + nfixparams + 1)); 286 setnilvalue2s(ci->func.p + nfixparams + 1);
287 lua_assert(L->top.p <= ci->top.p && ci->top.p <= L->stack_last.p); 287 lua_assert(L->top.p <= ci->top.p && ci->top.p <= L->stack_last.p);
288 } 288 }
289} 289}
@@ -307,7 +307,7 @@ void luaT_getvararg (CallInfo *ci, StkId ra, TValue *rc) {
307 return; 307 return;
308 } 308 }
309 } 309 }
310 setnilvalue(s2v(ra)); /* else produce nil */ 310 setnilvalue2s(ra); /* else produce nil */
311} 311}
312 312
313 313
@@ -355,10 +355,10 @@ void luaT_getvarargs (lua_State *L, CallInfo *ci, StkId where, int wanted,
355 for (i = 0; i < touse; i++) { 355 for (i = 0; i < touse; i++) {
356 lu_byte tag = luaH_getint(h, i + 1, s2v(where + i)); 356 lu_byte tag = luaH_getint(h, i + 1, s2v(where + i));
357 if (tagisempty(tag)) 357 if (tagisempty(tag))
358 setnilvalue(s2v(where + i)); 358 setnilvalue2s(where + i);
359 } 359 }
360 } 360 }
361 for (; i < wanted; i++) /* complete required results with nil */ 361 for (; i < wanted; i++) /* complete required results with nil */
362 setnilvalue(s2v(where + i)); 362 setnilvalue2s(where + i);
363} 363}
364 364