summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h25
1 files changed, 7 insertions, 18 deletions
diff --git a/sv.h b/sv.h
index d0d8b65fff..060149bd67 100644
--- a/sv.h
+++ b/sv.h
@@ -1820,6 +1820,9 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv>.
#define SV_HAS_TRAILING_NUL 256
#define SV_COW_SHARED_HASH_KEYS 512
/* This one is only enabled for PERL_OLD_COPY_ON_WRITE */
+/* XXX This flag actually enabled for any COW. But it appears not to do
+ anything. Can we just remove it? Or will it serve some future
+ purpose. */
#define SV_COW_OTHER_PVS 1024
/* Make sv_2pv_flags return NULL if something is undefined. */
#define SV_UNDEF_RETURNS_NULL 2048
@@ -1861,26 +1864,13 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv>.
#define SV_CHECK_THINKFIRST_COW_DROP(sv) if (SvTHINKFIRST(sv)) \
sv_force_normal_flags(sv, SV_COW_DROP_PV)
-#ifdef PERL_OLD_COPY_ON_WRITE
-#define SvRELEASE_IVX(sv) \
- ((SvIsCOW(sv) ? sv_force_normal_flags(sv, 0) : (void) 0), 0)
-# define SvIsCOW_normal(sv) (SvIsCOW(sv) && SvLEN(sv))
-# define SvRELEASE_IVX_(sv) SvRELEASE_IVX(sv),
-# define SvCANCOW(sv) \
- (SvIsCOW(sv) || (SvFLAGS(sv) & CAN_COW_MASK) == CAN_COW_FLAGS)
-/* This is a pessimistic view. Scalar must be purely a read-write PV to copy-
- on-write. */
-# define CAN_COW_MASK (SVs_OBJECT|SVs_GMG|SVs_SMG|SVs_RMG|SVf_IOK|SVf_NOK| \
- SVf_POK|SVf_ROK|SVp_IOK|SVp_NOK|SVp_POK|SVf_FAKE| \
- SVf_OOK|SVf_BREAK|SVf_READONLY|SVf_PROTECT)
-#else
-# define SvRELEASE_IVX(sv) 0
+#define SvRELEASE_IVX(sv) 0
/* This little game brought to you by the need to shut this warning up:
mg.c: In function 'Perl_magic_get':
mg.c:1024: warning: left-hand operand of comma expression has no effect
*/
-# define SvRELEASE_IVX_(sv) /**/
-# ifdef PERL_NEW_COPY_ON_WRITE
+#define SvRELEASE_IVX_(sv) /**/
+#ifdef PERL_NEW_COPY_ON_WRITE
# define SvCANCOW(sv) \
(SvIsCOW(sv) \
? SvLEN(sv) ? CowREFCNT(sv) != SV_COW_REFCNT_MAX : 1 \
@@ -1891,8 +1881,7 @@ mg.c:1024: warning: left-hand operand of comma expression has no effect
# define SV_COW_REFCNT_MAX ((1 << sizeof(U8)*8) - 1)
# define CAN_COW_MASK (SVf_POK|SVf_ROK|SVp_POK|SVf_FAKE| \
SVf_OOK|SVf_BREAK|SVf_READONLY|SVf_PROTECT)
-# endif
-#endif /* PERL_OLD_COPY_ON_WRITE */
+#endif
#define CAN_COW_FLAGS (SVp_POK|SVf_POK)