The stupid question is the question not asked | |
PerlMonks |
Re^6: XS: EXTEND/mPUSHiby ikegami (Patriarch) |
on Sep 27, 2011 at 01:33 UTC ( [id://927995]=note: print w/replies, xml ) | Need Help?? |
xsubpp currently generates SP -= items;. That change to the stack pointer is lost, since it's done in the real XS function (the wrapper), which doesn't doesn't "publish" the change using PUTBACK before calling the wrapped function. I'd make Inline::C call PUTBACK before calling the wrapper function and make Inline_Stack_Reset a no-op. In two places:
Update: I thought there would be backwards compatibility issues, but there aren't. ST(0) and such will still get the args. Adjusted.
In Section
Seekers of Perl Wisdom
|
|