lua-users home
lua-l archive

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


I was curious as to why the naming of lua_newuserdatabox doesn't follow
the same naming convention as all the lua_push* functions. Tracing
though the code a bit, I was disappointed to discover that
lua_newuserdatabox ends up causing a memory allocation. Can't we please
have a lua_pushuserdata(lua_State *, void *) or the like? I know this
has been discussed already, but at the time my (mis)understanding was
that the new lua_newuserdatabox was lightweight. An allocation just to
pass a simple pointer is going to kill performance. This is the kind of
thing that could cause me to have to significantly scale back the scope
I was planning for Lua to have in my project.

Thanks,

Curt