From: Nicholas Clark Date: Mon, 20 Feb 2006 11:54:03 +0000 (+0000) Subject: Need to clear CvXSUBANY() too to turn a constant sub into a prototype. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa092aa30938df861825e5192a09d0567bdac529;p=p5sagit%2Fp5-mst-13.2.git Need to clear CvXSUBANY() too to turn a constant sub into a prototype. p4raw-id: //depot/perl@27242 --- diff --git a/lib/ExtUtils/Constant/ProxySubs.pm b/lib/ExtUtils/Constant/ProxySubs.pm index d9c9ac3..a358a66 100644 --- a/lib/ExtUtils/Constant/ProxySubs.pm +++ b/lib/ExtUtils/Constant/ProxySubs.pm @@ -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,