diff options
author | Father Chrysostomos <sprout@cpan.org> | 2011-07-12 12:24:29 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2011-07-12 13:00:02 -0700 |
commit | fa819c1ce3252e7ae97e9cdd4d3d0dd1edb06fa1 (patch) | |
tree | 9de6862f1c09e08526ecb4c315aec824c6f82b8e /sv.h | |
parent | 21690b721fd5cd765bcc0330aa94f9172c24582d (diff) | |
download | perl-fa819c1ce3252e7ae97e9cdd4d3d0dd1edb06fa1.tar.gz |
Make SvIsCOW honest about globs
SvIsCOW was ignoring the fact that it might be passed a
typeglob, which made its behaviour contradict its docs.
This fixes that and, in doing so, simplifies the
upcoming Internals::SvREADONLY fix.
Diffstat (limited to 'sv.h')
-rw-r--r-- | sv.h | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1738,8 +1738,8 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv> # define SvTRUEx(sv) ((PL_Sv = (sv)), SvTRUE(PL_Sv)) #endif /* __GNU__ */ -#define SvIsCOW(sv) ((SvFLAGS(sv) & (SVf_FAKE | SVf_READONLY)) == \ - (SVf_FAKE | SVf_READONLY)) +#define SvIsCOW(sv) ((SvFLAGS(sv) & (SVf_FAKE | SVf_READONLY)) == \ + (SVf_FAKE | SVf_READONLY) && !isGV_with_GP(sv)) #define SvIsCOW_shared_hash(sv) (SvIsCOW(sv) && SvLEN(sv) == 0) #define SvSHARED_HEK_FROM_PV(pvx) \ |