lua-users home
lua-l archive

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


On 5 April 2011 18:26, CrazyButcher <crazybutcher@luxinia.de> wrote:
> what has been suggested before is make a little classic lua C
> interface function that exposes sized userdata with a metatable.
> see mailinglist [1]
>
> you then can ffi.cast the userdata to the actual type being stored in
> it. and work from that
>
> http://osdir.com/ml/general/2011-02/msg22639.html
>
>

Not a bad solution, but I like to avoid C code (and compilers) with my
ffi code....
Could we perhaps get a newuserdata(size) function built into the ffi?
(so, pretty much newproxy with a size argument)

Daurn