[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Incorrect use of setobjs2s
- From: Daurnimator <quae@...>
- Date: Tue, 23 May 2017 18:20:28 +1000
On 23 May 2017 at 17:08, Daurnimator <email@example.com> wrote:
> Looking through the lua source, I noticed in ldo.c:
> setobjs2s(L, g->mainthread->top++, L->top - 1); /* copy error obj. */
> As far as I can see from comments in lobject.h, setobjs2s is meant to
> only be used when copying to the same stack.
After noticing that I did a bit of an audit.
In lvm.c these could be setobjs2s:
setobj2s(L, top - 2, top); /* put TM result in proper position */
setobj2s(L, ci->u.l.base + GETARG_A(inst), L->top - 1);