X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=sv.h;h=c5b01790dc2d1846b8cce2ab87d66879c68bcb85;hb=6ef249b908f1fd6caec1b0140c6be9c66f4eb1f2;hp=54f319d68e8cddfb59f2419dca95dddef62d6de0;hpb=4ea561bc94841f378b6950ed75b669dc60767dfa;p=p5sagit%2Fp5-mst-13.2.git diff --git a/sv.h b/sv.h index 54f319d..c5b0179 100644 --- a/sv.h +++ b/sv.h @@ -344,15 +344,20 @@ perform the upgrade if necessary. See C. #define PRIVSHIFT 4 /* (SVp_?OK >> PRIVSHIFT) == SVf_?OK */ #define SVf_AMAGIC 0x10000000 /* has magical overloaded methods */ + +/* Ensure this value does not clash with the GV_ADD* flags in gv.h: */ #define SVf_UTF8 0x20000000 /* SvPV is UTF-8 encoded This is also set on RVs whose overloaded stringification is UTF-8. This might only happen as a side effect of SvPV() */ -/* Ensure this value does not clash with the GV_ADD* flags in gv.h */ /* Some private flags. */ +/* PVAV could probably use 0x2000000 without conflict. I assume that PVFM can + be UTF-8 encoded, and PVCVs could well have UTF-8 prototypes. PVIOs haven't + been restructured, so sometimes get used as string buffers. */ + /* PVHV */ #define SVphv_SHAREKEYS 0x20000000 /* PVHV keys live on shared string table */ /* PVNV, PVMG, presumably only inside pads */ @@ -1839,13 +1844,15 @@ Like C but doesn't process magic. #define SV_SMAGIC 128 #define SV_HAS_TRAILING_NUL 256 #define SV_COW_SHARED_HASH_KEYS 512 +/* This one is only enabled for PERL_OLD_COPY_ON_WRITE */ +#define SV_COW_OTHER_PVS 1024 /* The core is safe for this COW optimisation. XS code on CPAN may not be. So only default to doing the COW setup if we're in the core. */ #ifdef PERL_CORE # ifndef SV_DO_COW_SVSETSV -# define SV_DO_COW_SVSETSV SV_COW_SHARED_HASH_KEYS +# define SV_DO_COW_SVSETSV SV_COW_SHARED_HASH_KEYS|SV_COW_OTHER_PVS # endif #endif