[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Calling back into lua from a gc method -- okay?
- From: "Ashwin Hirschi" <deery@...>
- Date: Tue, 17 Dec 2002 18:56:37 +0100
> > This naughty (but rather useful) thing is that I'm calling back into
> > lua from a cfunction being called as a heavy userdata's __gc method.
> > Is this supposed to be okay? I can see why it might be a problem if
> > this hasn't been designed for.
> This is ok in 5.0. You can do anything from a __gc method (even call
> the garbage collector again).
Since I'm currently checking the garbage collection code in one of my Lua
4-based projects (and couldn't help noticing the "5.0" above) I was
Are there any specific limitations in Lua 4.0.1 on what you can do from
within a C function as registered gc tag method?
I am not aware of any [apart from hooks being disabled]. But if there are
I'd rather find out sooner than later, esp. since the project is commercial
Thanks for any information you can provide!
P.S. And while I'm at it: a big & heartfelt "Thank You!" for Lua in general,
as it is definitely making my professional life a whole lot more enjoyable!