Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-08 Thread Nick Ing-Simmons
Tassilo Parseval [EMAIL PROTECTED] writes: I was once more thinking about this PUSHMARK/PUSHBACK issue. perlapi.pod described them as opening and closing brackets for the arguments. If I leave those off altogether, shouldn't then simply the current @_ be passed on to the callback? This would be

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Jan Dubois
On Sun, 07 Sep 2003 09:49:32 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: Hi there, this is the strangest thing I've ever encountered so far with XS. To me it looks like a very obscure bug in perl, but hopefully it's not. The Perl examples actually use autobox, but the very same

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Tassilo von Parseval
On Sun, Sep 07, 2003 at 09:02:11AM -0700 Jan Dubois wrote: On Sun, 07 Sep 2003 09:49:32 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: this is the strangest thing I've ever encountered so far with XS. To me it looks like a very obscure bug in perl, but hopefully it's not. The Perl

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Tassilo von Parseval
On Sun, Sep 07, 2003 at 02:29:16PM +0100 Nicholas Clark wrote: On Sun, Sep 07, 2003 at 09:49:32AM +0200, Tassilo von Parseval wrote: I have a very basic C function that triggers a Perl callback: SV * call_Pslice (const char *func) { SV *res; dSP;

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Nick Ing-Simmons
Jan Dubois [EMAIL PROTECTED] writes: On Sun, 07 Sep 2003 09:49:32 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: Hi there, this is the strangest thing I've ever encountered so far with XS. To me it looks like a very obscure bug in perl, but hopefully it's not. The Perl examples actually

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Jan Dubois
On Sun, 07 Sep 2003 18:40:59 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: 2) Calling call_xxx() without G_EVAL often doesn't work correctly when your Perl sub can die(). Maybe it is just cargo cult, but I've been bitten by this one too many times and now always specify G_EVAL and

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Tassilo von Parseval
On Sun, Sep 07, 2003 at 10:42:17AM -0700 Jan Dubois wrote: On Sun, 07 Sep 2003 18:40:59 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: I'll do a few tests and see whether not using G_EVAL can produce inconsistent results. I guess that if (SvTRUE(ERRSV)) croak(Nullch); would

Re: return value from XSUB mysteriously disappearing on second invocation

2003-09-07 Thread Jan Dubois
On Sun, 07 Sep 2003 19:52:56 +0200, Tassilo von Parseval [EMAIL PROTECTED] wrote: I was once more thinking about this PUSHMARK/PUSHBACK issue. perlapi.pod described them as opening and closing brackets for the arguments. If I'm not aware of PUSHBACK, I assume you mean PUTBACK. They are not