[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Question regarding Protect() in lvm.c
- From: Dibyendu Majumdar <mobile@...>
- Date: Sun, 22 Feb 2015 16:42:29 +0000
On 22 February 2015 at 16:37, Roberto Ierusalimschy
<roberto@inf.puc-rio.br> wrote:
>> It seems that the stack can be reallocated if there is a function
>> call.
>
> A function call in Lua (not in C).
>
>
>> So then in the following snippet is it okay to just protect the
>> call to luaV_equalobj()?
>>
>> case OP_EQ: {
>> TValue *rb = RKB(i);
>> TValue *rc = RKC(i);
>> Protect(
>> if (cast_int(luaV_equalobj(L, rb, rc)) != GETARG_A(i))
>> ci->u.l.savedpc++;
>> else
>> donextjump(ci);
>> )
>> } break;
>
> It would be, but the current 'Protect' macro only acceps commands,
> not expressions.
Okay thanks.
Regards
Dibyendu