[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: RE: __assign
- From: "Dan East" <dan@...>
- Date: Mon, 14 Jun 2004 13:17:45 -0400
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
[mailto:firstname.lastname@example.org]On Behalf Of Luiz Henrique
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.