develooper Front page | perl.perl5.porters | Postings from December 2011


Thread Previous | Thread Next
Jesse Luehrs
December 11, 2011 11:40
Message ID:
On Sun, Dec 11, 2011 at 11:34:28AM -0800, Father Chrysostomos wrote:
> sv.c contains this comment:
> 	     /* The change that added SV_COW_SHARED_HASH_KEYS makes the logic
> 		when PERL_OLD_COPY_ON_WRITE is defined a little wrong.
> 		Conceptually PERL_OLD_COPY_ON_WRITE being defined should
> 		override SV_COW_SHARED_HASH_KEYS, because it means "always COW"
> 		but in turn, it's somewhat dead code, never expected to go
> 		live, but more kept as a placeholder on how to do it better
> 		in a newer implementation.  */
> What is wrong with PERL_OLD_COPY_ON_WRITE? Why wouldn’t it work the way it is written?

git blame points to here:

commit 34482cd6991b4dc2f3757baff881b50e6de59592
Author: Nicholas Clark <>
Date:   Sun Nov 12 20:22:28 2006 +0000

    Change 24714 was arguably over-ambitious, in that non-core modules
    can't be expected to know that sv_setsv() may now not "really" copy a
    scalar. So arrange things so that COW of shared hash key scalars is
    only done for calls within the the PERL_CORE.
    p4raw-id: //depot/perl@29248


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About