lua-users home
lua-l archive

small bug

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


There is a very subtle bug in 5.0 alpha, that happens (sometimes) when a
userdata has a GC method stored in a weak metatable. The correction is
as follows:
--- lgc.c
*** 485,490 ****
--- 485,491 ----
 separateudata(L); /* separate userdata to be preserved */
 marktmu(&st); /* mark `preserved' userdata */
 propagatemarks(&st); /* remark */
+ cleartablevalues(&st);
 cleartablekeys(&st);
 luaC_collect(L, 0);
 checkMbuffer(L);
-- Roberto

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