lua-users home
lua-l archive

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

  Much better, thank you.  Implementation in C would be slightly cleaner if
a metatable could be attached to lightuserdata (avoiding pointers to
pointers and having to allocate extra memory), but that's no biggie.  Works

  Dan East

-----Original Message-----
[]On Behalf Of Luiz Henrique
de Figueiredo
Sent: Monday, June 14, 2004 12:30 PM
Subject: RE: __assign

>I'm currently storing the pointer to the C struct as the only element
>in the table.

If you're storing everything in C, you don't need to create a proxy Lua
just export the C struct as userdata to Lua and set __index and __newindex
metamethods for it.