Tels <[EMAIL PROTECTED]> writes:
>The last lines of my original routine, with a void return type:
>
>    temp = *av_fetch(a, 0, 0);          /* fetch first element */
>    ST(0) = boolSV((SvIV(temp) == 0));
>#line 554 "FastCalc.c"
>    }
>    XSRETURN(1);
>}
>
>The same with RETVAL and OUTPUT: section:
>
>    temp = *av_fetch(a, 0, 0);          /* fetch first element */
>    RETVAL = boolSV((SvIV(temp) == 0));
>#line 582 "FastCalc.c"
>        ST(0) = RETVAL;
>        sv_2mortal(ST(0));
>    }
>    XSRETURN(1);
>}
>
>
>See the sv2mortal(ST(0)); there? :) I think it doesn't hurt, but it 
>certainly is not neccessary, since everything works fine without it.

The TRUE and FALSE SVs retuned by boolSV have infinite REFCNT
so mortal-ize is unnecessary but harmless.

Most other returns from XS should be mortal (or not have 
their REFCNT inclemented).


>
>Best wishes,
>
>Tels
>
>- -- 
> Signed on Sun Aug 15 22:11:32 2004 with key 0x93B84C15.
> Visit my photo gallery at http://bloodgate.com/photos/
> PGP key on http://bloodgate.com/tels.asc or per email.
>
> "Retsina?" - "Ja, Papa?" - "Warp 3." - "Is gut, Papa."
>
>-----BEGIN PGP SIGNATURE-----
>Version: GnuPG v1.2.4 (GNU/Linux)
>Comment: When cryptography is outlawed, bayl bhgynjf jvyy unir cevinpl.
>
>iQEVAwUBQR/EJncLPEOTuEwVAQEjjwf8CCBlnzo8PjFSckeLmaNZs5uc0OoBZwNs
>cVkQTD25DEuPMAmtLqonsfFBdJCdvWripUsy2Ofb864EcdNeTKsRp8m408SXPi9/
>cKI07iDFI0HuEsmbhgp5YORpBlXNZsjOOaZDWtyxbTHyoaUSmn43SBI20hQq9pDS
>2a0uESsOHGFlediY8IzfhOUFmEkU624T4E2u+eLi2aJ1/voJwam93K1lGf224gxa
>U2o/57cO/p24l0AZerj/UCrGK3+gwp/DvDWwgNcymkoKr5dtWwwLNKQ8uuc6X9+L
>R1DsMvdFE3z3C0QqzGCq6NvgEcLkfq7YNdJHTx4pfRH+vCJI0AU30A==
>=jAGv
>-----END PGP SIGNATURE-----

Reply via email to