This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Data::Dumper/qr.t: Add test names and diagnostics
[perl5.git] / sv.h
diff --git a/sv.h b/sv.h
index 4282144..935f4ff 100644 (file)
--- a/sv.h
+++ b/sv.h
@@ -1417,7 +1417,7 @@ C<SvPVx> for a version which guarantees to evaluate sv only once.
 =for apidoc Am|char*|SvPVx|SV* sv|STRLEN len
 A version of C<SvPV> which guarantees to evaluate C<sv> only once.
 Only use this if C<sv> is an expression with side effects, otherwise use the
-more efficient C<SvPVX>.
+more efficient C<SvPV>.
 
 =for apidoc Am|char*|SvPV_nomg|SV* sv|STRLEN len
 Like C<SvPV> but doesn't process magic.
@@ -1745,7 +1745,8 @@ Like sv_utf8_upgrade, but doesn't do magic on C<sv>.
 #endif /* __GNU__ */
 
 #define SvIsCOW(sv)    ((SvFLAGS(sv) & (SVf_FAKE | SVf_READONLY)) == \
-                          (SVf_FAKE | SVf_READONLY) && !isGV_with_GP(sv))
+                          (SVf_FAKE | SVf_READONLY) && !isGV_with_GP(sv) \
+                          && SvTYPE(sv) != SVt_REGEXP)
 #define SvIsCOW_shared_hash(sv)        (SvIsCOW(sv) && SvLEN(sv) == 0)
 
 #define SvSHARED_HEK_FROM_PV(pvx) \