lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


> 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).


> In the absence of known bugs in lua 5.0a itself which might be to
> blame,

Actually, I found a very weird bug while developing 5.0b that may be
related to your problem. As far as I could understand it, that bug was
not present in 5.0a, but I am not completely sure about that. (The
bug was almost impossible to reproduce; any tool [debbuger, valgrind]
changed its behavior.) Anyway, we simplified some stuff in 5.0b (now we
hope we can understand it ;-), so maybe you may wait for it to check
whether your bug vanishes. (At most one more week, I hope.)

-- Roberto