File tree 3 files changed +21
-4
lines changed 3 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -2494,16 +2494,20 @@ typedef AV PAD;
2494
2494
typedef AV PADNAMELIST;
2495
2495
typedef SV PADNAME;
2496
2496
2497
- #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW)
2498
- # define PERL_NEW_COPY_ON_WRITE
2499
- #endif
2497
+ /* XXX for 5.18, disable the COW by default
2498
+ * #if !defined(PERL_OLD_COPY_ON_WRITE) && !defined(PERL_NEW_COPY_ON_WRITE) && !defined(PERL_NO_COW)
2499
+ * # define PERL_NEW_COPY_ON_WRITE
2500
+ * #endif
2501
+ */
2500
2502
2501
2503
#if defined(PERL_OLD_COPY_ON_WRITE) || defined(PERL_NEW_COPY_ON_WRITE)
2502
2504
# if defined(PERL_OLD_COPY_ON_WRITE) && defined(PERL_NEW_COPY_ON_WRITE)
2503
2505
# error PERL_OLD_COPY_ON_WRITE and PERL_NEW_COPY_ON_WRITE are exclusive
2504
2506
# else
2505
2507
# define PERL_ANY_COW
2506
2508
# endif
2509
+ #else
2510
+ # define PERL_SAWAMPERSAND
2507
2511
#endif
2508
2512
2509
2513
#include " handy.h"
Original file line number Diff line number Diff line change @@ -304,7 +304,19 @@ well.
304
304
305
305
=item *
306
306
307
- XXX
307
+ The new copy-on-write mechanism that was introduced in 5.17.7 has now been
308
+ disabled by default, since it was felt that there were two many rough
309
+ edges for the 5.18 release. It is expected that it will be enabled by
310
+ default for 5.20.
311
+
312
+ This change also re-enables PL_sawampersand by default.
313
+
314
+ It can be enabled in a perl build by running F<Configure> with
315
+ B<-Accflags=-DPERL_NEW_COPY_ON_WRITE>, and we would encourage XS authors to
316
+ try their code with such an enabled perl, and provide feedback.
317
+ XXX need blurb, e.g. a reference to a new section in perlguts or perlxs
318
+ explaining how XS authors should handle COW strings.
319
+
308
320
309
321
=back
310
322
Original file line number Diff line number Diff line change @@ -1147,6 +1147,7 @@ EOP
1147
1147
1148
1148
{
1149
1149
# [perl #4289] First mention $& after a match
1150
+ local $: :TODO = " these tests fail without Copy-on-Write enabled" ;
1150
1151
fresh_perl_is(
1151
1152
' $_ = "abc"; /b/g; $_ = "hello"; print eval q|$&|, "\n"' ,
1152
1153
" b\n " , {}, ' $& first mentioned after match' );
You can’t perform that action at this time.
0 commit comments