From: Nicholas Clark Date: Thu, 25 Aug 2005 13:46:31 +0000 (+0000) Subject: Promote the warning about reference miscount in sv_replace to a panic. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=30e5c352c9c1099120007e8b6e9318a33d99b3bb;p=p5sagit%2Fp5-mst-13.2.git Promote the warning about reference miscount in sv_replace to a panic. TODO - document the panics p4raw-id: //depot/perl@25330 --- diff --git a/sv.c b/sv.c index 88c864b..5089825 100644 --- a/sv.c +++ b/sv.c @@ -5408,8 +5408,10 @@ Perl_sv_replace(pTHX_ register SV *sv, register SV *nsv) { const U32 refcnt = SvREFCNT(sv); SV_CHECK_THINKFIRST_COW_DROP(sv); - if (SvREFCNT(nsv) != 1 && ckWARN_d(WARN_INTERNAL)) - Perl_warner(aTHX_ packWARN(WARN_INTERNAL), "Reference miscount in sv_replace()"); + if (SvREFCNT(nsv) != 1) { + Perl_croak(aTHX_ "panic: feference miscount on nsv in sv_replace() (%" + UVuf " != 1)", (UV) SvREFCNT(nsv)); + } if (SvMAGICAL(sv)) { if (SvMAGICAL(nsv)) mg_free(nsv);