File tree Expand file tree Collapse file tree 2 files changed +20
-15
lines changed Expand file tree Collapse file tree 2 files changed +20
-15
lines changed Original file line number Diff line number Diff line change @@ -211,6 +211,15 @@ BEGIN
211211 $define {USE_PERL_SWITCH_LOCALE_CONTEXT } = 1;
212212}
213213
214+ # enable PERL_COPY_ON_WRITE by default
215+ $define {PERL_COPY_ON_WRITE } = 1 unless $define {PERL_NO_COW };
216+ if ($define {PERL_COPY_ON_WRITE }) {
217+ $define {PERL_ANY_COW } = 1;
218+ }
219+ else {
220+ $define {PERL_SAWAMPERSAND } = 1;
221+ }
222+
214223# perl.h logic duplication ends
215224# ==========================================================================
216225
@@ -371,10 +380,6 @@ sub readvar {
371380 ) ;
372381}
373382
374- if (!$define {' PERL_COPY_ON_WRITE' } || $define {' PERL_NO_COW' }) {
375- ++$skip {Perl_sv_setsv_cow };
376- }
377-
378383unless ($define {PERL_SAWAMPERSAND }) {
379384 ++$skip {PL_sawampersand };
380385}
Original file line number Diff line number Diff line change @@ -1325,6 +1325,17 @@ typedef enum {
13251325# endif
13261326#endif /* End of USE_LOCALE */
13271327
1328+ /* enable PERL_COPY_ON_WRITE by default */
1329+ #if !defined(PERL_COPY_ON_WRITE) && !defined(PERL_NO_COW)
1330+ # define PERL_COPY_ON_WRITE
1331+ #endif
1332+
1333+ #ifdef PERL_COPY_ON_WRITE
1334+ # define PERL_ANY_COW
1335+ #else
1336+ # define PERL_SAWAMPERSAND
1337+ #endif
1338+
13281339/* end of makedef.pl logic duplication
13291340 * ========================================================================= */
13301341
@@ -3218,17 +3229,6 @@ typedef struct padname PADNAME;
32183229# define PERL_OP_PARENT
32193230#endif
32203231
3221- /* enable PERL_COPY_ON_WRITE by default */
3222- #if !defined(PERL_COPY_ON_WRITE) && !defined(PERL_NO_COW)
3223- # define PERL_COPY_ON_WRITE
3224- #endif
3225-
3226- #ifdef PERL_COPY_ON_WRITE
3227- # define PERL_ANY_COW
3228- #else
3229- # define PERL_SAWAMPERSAND
3230- #endif
3231-
32323232#if defined(PERL_DEBUG_READONLY_OPS) && !defined(USE_ITHREADS)
32333233# error PERL_DEBUG_READONLY_OPS only works with ithreads
32343234#endif
You can’t perform that action at this time.
0 commit comments