[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Minimal 4.1 OO
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 11 Apr 2002 09:22:15 -0300
> First, is there any documentation for 4.1w4 more up to date than
> I just got 4.0 figured out and now would like to know how to port.
Remember that 4.1w4 is a quite unstable version (regarding specs).
Everything there may change.
> tags are gone [...]
They were replaced by metatables. I guess the manual talks about that
already. (Does it?)
> and userdatabox seems to be the giant key.
For creating new objects, newuserdatabox is exactly the same as the
old pushuserdata. (For a "pushusertag", you first create it and then
change its metatable.) The only difference between newuserdatabox
and pushuserdata is that, when Lua already has a userdata with the
same address/tag, pushuserdata coalesces the new userdata with the old
one, while newuserdatabox always creates a new one. When creating new
objects, that situation never happens, so there is no difference between
the two functions.