This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Simplify the SvGMAGIC code in sv_[ipu]v_flags.
[perl5.git] / pad.c
diff --git a/pad.c b/pad.c
index cbc1cb5..a98d6ef 100644 (file)
--- a/pad.c
+++ b/pad.c
@@ -233,7 +233,7 @@ Perl_pad_undef(pTHX_ CV* cv)
 
     if (!padlist)
        return;
-    if (!SvREFCNT(CvPADLIST(cv))) /* may be during global destruction */
+    if (SvIS_FREED(padlist)) /* may be during global destruction */
        return;
 
     DEBUG_X(PerlIO_printf(Perl_debug_log,
@@ -862,7 +862,8 @@ S_pad_findlex(pTHX_ const char *name, const CV* cv, U32 seq, int warn,
     return new_offset;
 }
 
-               
+
+#ifdef DEBUGGING
 /*
 =for apidoc pad_sv
 
@@ -897,7 +898,6 @@ Use the macro PAD_SETSV() rather than calling this function directly.
 =cut
 */
 
-#ifdef DEBUGGING
 void
 Perl_pad_setsv(pTHX_ PADOFFSET po, SV* sv)
 {