develooper Front page | perl.perl5.porters | Postings from July 2001

Re: [PATCH sv.c] mortal doc thinko

Thread Previous
From:
Nick Ing-Simmons
Date:
July 27, 2001 01:04
Subject:
Re: [PATCH sv.c] mortal doc thinko
Message ID:
20010727080447.723.1@bactrian.ni-s.u-net.com
Dave Mitchell <davem@fdgroup.co.uk> writes:
>This minor patch for sv.c fixes some thinkos in the apidoc stuff
>I added a while back.

Not applied. Unless that patch is reversed it makes things worse IMHO.
I find the "current statement ends (or thereabouts)" misleading.

Mortality extends to next FREETMPS - the end of current perl statement does 
that I agree, but in XS code next person is not necessarily thinking 
in terms of perl statements (they might think that means XS "statement"), 
and should be considering their own 
ENTER/SAVETMPS/FREETMPS/LEAVE 
issues. So current "context" is "better" - but improvements welcome. 


>
>Dave M.
>
>--- sv.c-	Thu Jul 26 16:31:03 2001
>+++ sv.c	Thu Jul 26 16:33:23 2001
>@@ -6051,7 +6051,7 @@
> 
> Creates a new SV which is a copy of the original SV (using C<sv_setsv>).
> The new SV is marked as mortal. It will be destroyed when the current
>-context ends.  See also C<sv_newmortal> and C<sv_2mortal>.
>+statement ends (or thereabouts).  See also C<sv_newmortal> and C<sv_2mortal>.
> 
> =cut
> */
>@@ -6078,8 +6078,8 @@
> =for apidoc sv_newmortal
> 
> Creates a new null SV which is mortal.  The reference count of the SV is
>-set to 1. It will be destroyed when the current context ends.  See
>-also C<sv_mortalcopy> and C<sv_2mortal>.
>+set to 1. It will be destroyed when the current statement ends (or
>+thereabouts). See also C<sv_mortalcopy> and C<sv_2mortal>.
> 
> =cut
> */
>@@ -6099,8 +6099,8 @@
> /*
> =for apidoc sv_2mortal
> 
>-Marks an existing SV as mortal.  The SV will be destroyed when the current
>-context ends. See also C<sv_newmortal> and C<sv_mortalcopy>.
>+Marks an existing SV as mortal. The SV will be destroyed when the current
>+statement ends (or thereabouts). See also C<sv_newmortal> and C<sv_mortalcopy>.
> 
> =cut
> */
-- 
Nick Ing-Simmons
http://www.ni-s.u-net.com/


Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About