[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Bind Variables?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Mon, 3 Nov 2008 21:06:38 -0200
> If you want to do this, and make it feel natural to Lua, then it is a
> bit of a pig to do: Create a table (T), assign it a fresh metatable
> (MT), add an __index metamethod to MT which reads the value from the C
> structure and then add a __newindex metatable to MT which writes the
> value to the C structure.
Or use a userdata instead of a table.