httpd-apreq-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fred Moyer <f...@redhotpenguin.com>
Subject Re: svn commit: r744281 - /httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h
Date Fri, 13 Feb 2009 23:32:48 GMT
On Fri, Feb 13, 2009 at 3:27 PM,  <joes@apache.org> wrote:
> Author: joes
> Date: Fri Feb 13 23:27:31 2009
> New Revision: 744281
>
> URL: http://svn.apache.org/viewvc?rev=744281&view=rev
> Log:
> revert, yes mortal is correct here

Could you give a lamens explanation of sv_2mortal for those of us
aspiring hackers?  I've seen it all over the place in the mod_perl and
apreq codebase (and perl as well), but haven't ever been able to track
down what it really does.

>
> Modified:
>    httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h
>
> Modified: httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h
> URL: http://svn.apache.org/viewvc/httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h?rev=744281&r1=744280&r2=744281&view=diff
> ==============================================================================
> --- httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h (original)
> +++ httpd/apreq/trunk/glue/perl/xsbuilder/apreq_xs_postperl.h Fri Feb 13 23:27:31 2009
> @@ -250,13 +250,13 @@
>     }
>
>     if (obj != Nullsv)
> -        sv_setsv(*hv_fetch(data, "_r",   2, 1), newRV_inc(obj));
> +        sv_setsv(*hv_fetch(data, "_r",   2, 1), sv_2mortal(newRV_inc(obj)));
>     sv_setiv(*hv_fetch(data, "rc",   2, 1), rc);
>     sv_setpv(*hv_fetch(data, "file", 4, 1), CopFILE(PL_curcop));
>     sv_setiv(*hv_fetch(data, "line", 4, 1), CopLINE(PL_curcop));
>     sv_setpv(*hv_fetch(data, "func", 4, 1), func);
>
> -    sv_setsv(ERRSV, sv_bless(newRV_noinc((SV*)data), stash));
> +    sv_setsv(ERRSV, sv_2mortal(sv_bless(newRV_noinc((SV*)data), stash)));
>     Perl_croak(aTHX_ Nullch);
>  }
>
>
>
>

Mime
View raw message