This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Deprecate isFOO_utf8() macros
[perl5.git] / ext / XS-APItest / core_or_not.inc
index 8fa3234..074fe60 100644 (file)
@@ -16,15 +16,15 @@ CAT2(sv_setsv_cow_hashkey_, SUFFIX) () {
     SV *destination = newSV(0);
     bool result;
 
-    if(!SvREADONLY(source) && !SvFAKE(source)) {
+    if(!SvIsCOW(source)) {
        SvREFCNT_dec(source);
        Perl_croak(aTHX_ "Creating a shared hash key scalar failed when "
-              STRINGIFY(SUFFIX) " got flags %"UVxf, (UV)SvFLAGS(source));
+              STRINGIFY(SUFFIX) " got flags %" UVxf, (UV)SvFLAGS(source));
     }
 
     sv_setsv(destination, source);
 
-    result = SvREADONLY(destination) && SvFAKE(destination);
+    result = !!SvIsCOW(destination);
 
     SvREFCNT_dec(source);
     SvREFCNT_dec(destination);
@@ -35,10 +35,7 @@ CAT2(sv_setsv_cow_hashkey_, SUFFIX) () {
 /*
  * Local variables:
  * mode: c
- * c-indentation-style: bsd
- * c-basic-offset: 4
- * indent-tabs-mode: t
  * End:
  *
- * ex: set ts=8 sts=4 sw=4 noet:
+ * ex: set ts=8 sts=4 sw=4 et:
  */