[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Lua 5.2.0 (beta-rc1) now available
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Wed, 15 Jun 2011 18:46:03 -0300
> 2) the last update 5.2-beta introduce a funny behavior with __gc. Now
> you need to setup a metatable with the __gc entry before the metatable
> is used with an user_data (or it won't be called).
Yes, but you only need to set the index not the value. In other words,
you're free to set __gc=true and set the actual metamethod later.
> And also now __gc is called for tables, which didn't happen before
> (in my code I always try to pick a user data as first argument, and
> suddenly a table appear where user_data used to be)
Only if you do set __gc for tables of course.
- References:
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Frank Meier-Dörnberg
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, David Kastrup
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Frank Meier-Dörnberg
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Eduardo Ochs
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Frank Meier-Dörnberg
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, David Given
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Javier Guerra Giraldez
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Jose Luis Hidalgo
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Luiz Henrique de Figueiredo
- Re: [ANN] Lua 5.2.0 (beta-rc1) now available, Jose Luis Hidalgo