diff options
Diffstat (limited to 'ldo.c')
| -rw-r--r-- | ldo.c | 10 |
1 files changed, 5 insertions, 5 deletions
| @@ -349,7 +349,7 @@ int luaD_reallocstack (lua_State *L, int newsize, int raiseerror) { | |||
| 349 | correctstack(L, oldstack); /* change offsets back to pointers */ | 349 | correctstack(L, oldstack); /* change offsets back to pointers */ |
| 350 | L->stack_last.p = L->stack.p + newsize; | 350 | L->stack_last.p = L->stack.p + newsize; |
| 351 | for (i = oldsize + EXTRA_STACK; i < newsize + EXTRA_STACK; i++) | 351 | for (i = oldsize + EXTRA_STACK; i < newsize + EXTRA_STACK; i++) |
| 352 | setnilvalue(s2v(newstack + i)); /* erase new segment */ | 352 | setnilvalue2s(newstack + i); /* erase new segment */ |
| 353 | return 1; | 353 | return 1; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| @@ -554,7 +554,7 @@ l_sinline void genmoveresults (lua_State *L, StkId res, int nres, | |||
| 554 | for (i = 0; i < nres; i++) /* move all results to correct place */ | 554 | for (i = 0; i < nres; i++) /* move all results to correct place */ |
| 555 | setobjs2s(L, res + i, firstresult + i); | 555 | setobjs2s(L, res + i, firstresult + i); |
| 556 | for (; i < wanted; i++) /* complete wanted number of results */ | 556 | for (; i < wanted; i++) /* complete wanted number of results */ |
| 557 | setnilvalue(s2v(res + i)); | 557 | setnilvalue2s(res + i); |
| 558 | L->top.p = res + wanted; /* top points after the last result */ | 558 | L->top.p = res + wanted; /* top points after the last result */ |
| 559 | } | 559 | } |
| 560 | 560 | ||
| @@ -574,7 +574,7 @@ l_sinline void moveresults (lua_State *L, StkId res, int nres, | |||
| 574 | return; | 574 | return; |
| 575 | case 1 + 1: /* one value needed */ | 575 | case 1 + 1: /* one value needed */ |
| 576 | if (nres == 0) /* no results? */ | 576 | if (nres == 0) /* no results? */ |
| 577 | setnilvalue(s2v(res)); /* adjust with nil */ | 577 | setnilvalue2s(res); /* adjust with nil */ |
| 578 | else /* at least one result */ | 578 | else /* at least one result */ |
| 579 | setobjs2s(L, res, L->top.p - nres); /* move it to proper place */ | 579 | setobjs2s(L, res, L->top.p - nres); /* move it to proper place */ |
| 580 | L->top.p = res + 1; | 580 | L->top.p = res + 1; |
| @@ -694,7 +694,7 @@ int luaD_pretailcall (lua_State *L, CallInfo *ci, StkId func, | |||
| 694 | setobjs2s(L, ci->func.p + i, func + i); | 694 | setobjs2s(L, ci->func.p + i, func + i); |
| 695 | func = ci->func.p; /* moved-down function */ | 695 | func = ci->func.p; /* moved-down function */ |
| 696 | for (; narg1 <= nfixparams; narg1++) | 696 | for (; narg1 <= nfixparams; narg1++) |
| 697 | setnilvalue(s2v(func + narg1)); /* complete missing arguments */ | 697 | setnilvalue2s(func + narg1); /* complete missing arguments */ |
| 698 | ci->top.p = func + 1 + fsize; /* top for new function */ | 698 | ci->top.p = func + 1 + fsize; /* top for new function */ |
| 699 | lua_assert(ci->top.p <= L->stack_last.p); | 699 | lua_assert(ci->top.p <= L->stack_last.p); |
| 700 | ci->u.l.savedpc = p->code; /* starting point */ | 700 | ci->u.l.savedpc = p->code; /* starting point */ |
| @@ -741,7 +741,7 @@ CallInfo *luaD_precall (lua_State *L, StkId func, int nresults) { | |||
| 741 | L->ci = ci = prepCallInfo(L, func, status, func + 1 + fsize); | 741 | L->ci = ci = prepCallInfo(L, func, status, func + 1 + fsize); |
| 742 | ci->u.l.savedpc = p->code; /* starting point */ | 742 | ci->u.l.savedpc = p->code; /* starting point */ |
| 743 | for (; narg < nfixparams; narg++) | 743 | for (; narg < nfixparams; narg++) |
| 744 | setnilvalue(s2v(L->top.p++)); /* complete missing arguments */ | 744 | setnilvalue2s(L->top.p++); /* complete missing arguments */ |
| 745 | lua_assert(ci->top.p <= L->stack_last.p); | 745 | lua_assert(ci->top.p <= L->stack_last.p); |
| 746 | return ci; | 746 | return ci; |
| 747 | } | 747 | } |
