X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/4455f5a6814020ed04d0755a167c698a958bdbe7..34aeb2e92066dd41c16797e63eb0496735b5dfe4:/ext/XS-APItest/core_or_not.inc diff --git a/ext/XS-APItest/core_or_not.inc b/ext/XS-APItest/core_or_not.inc index 8fa3234..074fe60 100644 --- a/ext/XS-APItest/core_or_not.inc +++ b/ext/XS-APItest/core_or_not.inc @@ -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: */