[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: userdata in Lua 5.0 work 0
- From: Roberto Ierusalimschy <roberto@...>
- Date: Wed, 10 Jul 2002 11:19:36 -0300
> lua_newpointerbox() seems to do exactly the same as lua_newuserdatabox()
> previously, but as I can see no way to create a new 'light' version, I
> thought I would check that this is not a bug/unimplemented feature that
> will change next release. If I use lua_newpointerbox() is the intention
> that I get a fully functional metatable aware user object ?
The macro lua_newpointerbox does the same job of the lod lua_newuserdatabox
(although in a different way). It creates a "full" userdata and stores
your pointer inside it.
Notice that you do not "create" light userdata, as you do not create
numbers. You can push a light userdata with `lua_pushudataval' (bad name?
maybe we could change it to `lua_pushlightudata'...)