lua-users home
lua-l archive

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

Hi Mike,

I'm using luajit2 in my personal project and I love it so much^^.

And here are a requirement which I think maybe useful:
If we use create a instance of a struct like below
ffi.cdef[[typedef struct point{int x; int y;};]]
pt ='struct point', {1, 2})
If we then want change 'pt' to (10, 20), instead do staff like "pt.x=10;pt.y=20",
can we do it like this:
ffi.renew(pt, {10, 20})

Zhu Ya Dong