This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Revert 25331 (except for the typo fix).
authorNicholas Clark <nick@ccl4.org>
Thu, 25 Aug 2005 14:53:23 +0000 (14:53 +0000)
committerNicholas Clark <nick@ccl4.org>
Thu, 25 Aug 2005 14:53:23 +0000 (14:53 +0000)
p4raw-id: //depot/perl@25332

sv.c

diff --git a/sv.c b/sv.c
index 66f3dc0..60a4645 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -5412,10 +5412,6 @@ Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv)
        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);