in reply to Re^5: XS: EXTEND/mPUSHi
in thread XS: EXTEND/mPUSHi
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:
PPCODE: + PUTBACK; temp = PL_markstack_ptr++;
Update: I thought there would be backwards compatibility issues, but there aren't. ST(0) and such will still get the args. Adjusted.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^7: XS: EXTEND/mPUSHi
by syphilis (Archbishop) on Sep 27, 2011 at 04:16 UTC | |
by BrowserUk (Patriarch) on Sep 27, 2011 at 04:51 UTC | |
by ikegami (Patriarch) on Sep 27, 2011 at 07:43 UTC | |
by syphilis (Archbishop) on Sep 29, 2011 at 08:41 UTC | |
by BrowserUk (Patriarch) on Sep 29, 2011 at 10:46 UTC | |
by syphilis (Archbishop) on Sep 29, 2011 at 12:39 UTC |