in reply to
Using XSUBs, C APIs and pointers to objects
I found a
message
by Simon Cozens concerning your problem. He suggests using XPUSHs instead of XPUSHi.
Comment on
Re: Using XSUBs, C APIs and pointers to objects
In Section
Seekers of Perl Wisdom