This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Need to clear CvXSUBANY() too to turn a constant sub into a prototype.
authorNicholas Clark <nick@ccl4.org>
Mon, 20 Feb 2006 11:54:03 +0000 (11:54 +0000)
committerNicholas Clark <nick@ccl4.org>
Mon, 20 Feb 2006 11:54:03 +0000 (11:54 +0000)
p4raw-id: //depot/perl@27242

lib/ExtUtils/Constant/ProxySubs.pm

index d9c9ac3..a358a66 100644 (file)
@@ -9,7 +9,7 @@ require ExtUtils::Constant::XS;
 use ExtUtils::Constant::Utils qw(C_stringify);
 use ExtUtils::Constant::XS qw(%XS_TypeSet);
 
-$VERSION = '0.01';
+$VERSION = '0.02';
 @ISA = 'ExtUtils::Constant::XS';
 
 %type_to_struct =
@@ -367,8 +367,10 @@ EXPLODE
                CV *cv = newCONSTSUB(symbol_table, value_for_notfound->name,
                                     &PL_sv_yes);
                /* and then turn it into a non constant declaration only.  */
+               SvREFCNT_dec(CvXSUBANY(cv).any_ptr);
                CvCONST_off(cv);
                CvXSUB(cv) = NULL;
+               CvXSUBANY(cv).any_ptr = NULL;
            }
 
            if (!hv_store(${c_subname}_missing, value_for_notfound->name,