[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: is "__metatable" an event similar to "__gc" and "__tostring" oris it a convention?
- From: "Vijay Aswadhati" <wyseman@...>
- Date: Mon, 7 Jul 2003 22:23:32 -0700
Thank you all for the answers. It took me about 6 months
of lurking around and Lua 5.0, to finally sit down and write
a Lua binding for austin (http://users.footprints.net/~kaz/austin.html)
in three hours. The results are well worth the effort. Now I can move
on to the real stuff.
Some diagrams of the Lua VM and how it manages the metatables, registry
and the stack in general would help the curious to get hooked to Lua
faster.
-- Vijay Aswadhati
PS: I wrote the binding for austin just to get a feel of writing
bindings in "C" for Lua. I do not have any other use for it
other than to serve as an example. Let me know if it would be
useful to post the code on http://lua-users.org/wiki/
-----Original Message-----
From: lua-bounces@bazar2.conectiva.com.br
[mailto:lua-bounces@bazar2.conectiva.com.br]On Behalf Of Roberto
Ierusalimschy
Sent: Monday, July 07, 2003 6:14 AM
To: Lua list
Subject: Re: is "__metatable" an event similar to "__gc" and
"__tostring" oris it a convention?
__metatable is for protecting metatables. If you do not want a program
to change the contents of a metatable, you set its __metatable field.
With that, the program cannot access the metatable (and therefore cannot
change it).
-- Roberto