lua-users home
lua-l archive

Re: [ANN] Lua 5.3.6 (rc1) now available

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


>>>>> "Roberto" == Roberto Ierusalimschy <roberto@inf.puc-rio.br> writes:
 >> Has it been checked whether the 5.4 bug regarding shrinking a
 >> just-grown stack also exists in 5.3, because my superficial reading
 >> of the code suggests that it does?
 Roberto> I guess you are talking about this macro:
 Roberto> #define checkstackp(L,n,p) \
 Roberto> luaD_checkstackaux(L, n, \
 Roberto> ptrdiff_t t__ = savestack(L, p); /* save 'p' */ \
 Roberto> luaC_checkGC(L), /* stack grow uses memory */ \
 Roberto> p = restorestack(L, t__)) /* 'pos' part: restore 'p' */
 Roberto> What separates the macro arguments is the comma, not the
 Roberto> semicolon. So, the call to luaC_checkGC is done before the
 Roberto> stack reallocation.
Aha. Yes, that explains it.
-- 
Andrew.

AltStyle によって変換されたページ (->オリジナル) /