[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: custom "mark" function for userdata?
- From: Roberto Ierusalimschy <roberto@...>
- Date: Mon, 10 Aug 2009 13:46:18 -0300
> So I guess I'm wondering: is there any reason why Lua doesn't let
> userdata have a custom mark function? It would allow me to implement my
> extension much more efficiently.
Note that the Lua API does not have anything like a PyObject type. Lua
values have no representation in C at all. So, what would be the use
of a mark function? Where would it get the Lua objects to mark? If the
mark function can access a Lua object, this object is accessible and
therefore will be marked by Lua, without the need of a mark function.
-- Roberto