lua-users home
lua-l archive

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


Hi,

> > `lua_pushudataval' (bad name? maybe we could change it to 
> > `lua_pushlightudata'...)
> 
> Personally, I like "user object" for the current user data and "user
> pointer" for the 5.0work0 udataval...

I don't really care about the names, as long as the functions dealing with
them have consistent names. Currently, we have the following pairs:

    /* light user data */
    lua_pushudataval
    lua_topointer

    /* heavy user data (may have metatable) */
    lua_newuserdata
    lua_touserdata

    /* pointer stored on heavy user data (currently macros) */
    lua_newpointerbox
    lua_getfrombox

I think that at least the names for the functions creating/pushing the objects 
should be consistent with the names of the functions returning the values 
of these objects:

    /* light user data */
    lua_pushpointer
    lua_topointer

    /* heavy user data (may have metatable) */
    lua_newuserdata
    lua_touserdata

    /* pointer stored on heavy user data (currently macros) */
    lua_newpointerbox
    lua_getfrompointerbox? lua_topointerbox? 

Something like the above would make me happier.

Best regards,
Diego.