Front page | perl.perl5.porters |
Postings from December 2011
From: Jesse Luehrs
December 11, 2011 11:40
Message ID: 20111211194046.GB6564@tozt.net
On Sun, Dec 11, 2011 at 11:34:28AM -0800, Father Chrysostomos wrote:
> sv.c contains this comment:
> #ifndef PERL_OLD_COPY_ON_WRITE
> /* 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:
Author: Nicholas Clark <firstname.lastname@example.org>
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.