[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: protecting a variable
- From: Noel Frankinet <nfr@...>
- Date: Tue, 14 Mar 2006 17:19:59 +0100
Alex Queiroz wrote:
On 3/14/06, Noel Frankinet <firstname.lastname@example.org> wrote:
Is there a way to protect a variable like in tcl ("trace") ?
That is, how to call c or lua code whenever a lua variable is accessed
(read or write).
If the variable is global you can use the __index and __newindex
metamethods, for each global variable belongs to a table (_G in the
most common case).
Thank you for you answer but,
what are __index, __newindex, _G and how do I access them (from C).
Is there a doc or tutorial somewhere ?
Gistek Software SA