|
In fact, even type-checking doesn't help. If I have a typical boxed pointer userdata, with a metatable, and I probably want the __gc method to delete the object boxed. Now, I can call udata:__gc() from Lua code. The userdata still exists, but the boxed object has been deleted. Other calls on the udata can now segfault. I really think __gc should not be visible to Lua code. On Mar 30, 2007, at 2:21 AM, Graham Wakefield wrote:
grrr waaa www.grahamwakefield.net |