lua-users home
lua-l archive

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


> The old lua_pushuserdata also did memory allocation, when the pointer
was not already "inside" Lua. But, if you know that the pointer is
already inside Lua, usually you do not need to use lua_newuserdatabox,
but can use lua_pushvalue (or something similar). Those operations do
not do memory allocation.

This is all way too heavy weight. I just need to pass a pointer from C
and be able to get it back in C, with no more processing on it by Lua
than a simple number. These pointers point to things whose lifetimes
aren't controlled by anything in Lua anyway, so the argument about
refcount safety is irrelevant.

Thanks,

Curt