|
Chip Salzenberg wrote:
Sadly, none of these can be the issue, as the very same module works or does not work depending on which driver program calls it. The basic approach must be sound or else gc would never occur. I also set a panic function just to be sure. It was not called.
Ehm... I think the problem is that you're not registering your library.testxs.lua does a require "xstring" and xsperf.lua does not. Neither testxs.c nor xsperf.c opens your library, so it's up the the script to do that.
It'd be better if _xstr_newptr asserted on the absence of xstring's metatable. That would have catched this bug (if, indeed, this is the bug you're chasing) since you're pushing regular userdatum with an empty metatable.
Regards, Ignacio Burgueño