assert that the reference count of the target is also 1.
(Given that we're splatting an SV with a reference count of 1 onto
the target)
p4raw-id: //depot/perl@25331
const U32 refcnt = SvREFCNT(sv);
SV_CHECK_THINKFIRST_COW_DROP(sv);
if (SvREFCNT(nsv) != 1) {
- Perl_croak(aTHX_ "panic: feference miscount on nsv in sv_replace() (%"
+ Perl_croak(aTHX_ "panic: reference miscount on nsv in sv_replace() (%"
UVuf " != 1)", (UV) SvREFCNT(nsv));
}
+ if (SvREFCNT(sv) != 1) {
+ Perl_croak(aTHX_ "panic: reference miscount on sv in sv_replace() (%"
+ UVuf " != 1)", (UV) SvREFCNT(sv));
+ }
if (SvMAGICAL(sv)) {
if (SvMAGICAL(nsv))
mg_free(nsv);