extending SP disabling warnings in an XSUB

2004-01-10 Thread Tassilo von Parseval
Hi, two little questions this time. 1) When I return multiple values from an XSUB by doing a ST(0) = sv_newmortal(...); ST(1) = sv_newmortal(...); XSRETURN(2); do I have to do a prior EXTEND(SP, 2)? Currently I am not doing it and it seems to work fine. 2) For some parameter

Segfaults from XS code

2004-01-10 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, I have written a (simple?) routine in XS that uses the GMP library to calculate the modular inverse. When running a small test file, it segfaults at the end of the testfile like this: ... ok 253 ok 254 ok 255

Re: extending SP disabling warnings in an XSUB

2004-01-10 Thread Nick Ing-Simmons
Tassilo Parseval [EMAIL PROTECTED] writes: Hi, two little questions this time. 1) When I return multiple values from an XSUB by doing a ST(0) = sv_newmortal(...); ST(1) = sv_newmortal(...); XSRETURN(2); do I have to do a prior EXTEND(SP, 2)? Currently I am not doing it and it seems

Re: extending SP disabling warnings in an XSUB

2004-01-10 Thread Tassilo von Parseval
On Sat, Jan 10, 2004 at 03:35:39PM + Nicholas Clark wrote: On Sat, Jan 10, 2004 at 09:01:19AM +0100, Tassilo von Parseval wrote: Hi, two little questions this time. 1) When I return multiple values from an XSUB by doing a ST(0) = sv_newmortal(...); ST(1) =

Re: extending SP disabling warnings in an XSUB

2004-01-10 Thread Tassilo von Parseval
On Sat, Jan 10, 2004 at 04:48:17PM + Nick Ing-Simmons wrote: Tassilo Parseval [EMAIL PROTECTED] writes: Hi, two little questions this time. 1) When I return multiple values from an XSUB by doing a ST(0) = sv_newmortal(...); ST(1) = sv_newmortal(...); XSRETURN(2);

Re: Segfaults from XS code

2004-01-10 Thread Nick Ing-Simmons
Tels [EMAIL PROTECTED] writes: -BEGIN PGP SIGNED MESSAGE- Moin, I have written a (simple?) routine in XS that uses the GMP library to calculate the modular inverse. When running a small test file, it segfaults at the end of the testfile like this: ... ok 253 ok

Re: extending SP disabling warnings in an XSUB

2004-01-10 Thread Nick Ing-Simmons
Tassilo Parseval [EMAIL PROTECTED] writes: The risk is if what you show as '...' can croak() - then perhaps something to restore the SV would be appropriate. That fortunately can't happen in this particular case. But om the future, I might need something more generic, so... As this is an SV

Re: Segfaults from XS code

2004-01-10 Thread Tels
-BEGIN PGP SIGNED MESSAGE- Moin, On Saturday 10 January 2004 19:22, Nick Ing-Simmons wrote: Tels [EMAIL PROTECTED] writes: -BEGIN PGP SIGNED MESSAGE- valgrid is complaining about XS_Math__BigInt__GMP_DESTROY can we see that please?