lua-users home
lua-l archive

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


> 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'...)

-- Roberto