Enable PERL_NEW_COPY_ON_WRITE by default
authorFather Chrysostomos <sprout@cpan.org>
Wed, 21 Nov 2012 20:45:33 +0000 (12:45 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 27 Nov 2012 15:05:02 +0000 (07:05 -0800)
One can disable this with -Accflags=-DPERL_NO_COW.

I am leaving this in for debugging purposes.  If it causes no problems
in 5.18, we might remove the defines and enable it unconditionally in
5.20, but then again we might not.

perl.h

diff --git a/perl.h b/perl.h
index 0f85d28..3e2d6a0 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -2494,6 +2494,10 @@ typedef AV PAD;
 typedef AV PADNAMELIST;
 typedef SV PADNAME;
 
+#if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW)
+# define PERL_NEW_COPY_ON_WRITE
+#endif
+
 #if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE)
 # if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE)
 #  error PERL_OLD_COPY_ON_WRITE and PERL_NEW_COPY_ON_WRITE are exclusive