From: Nicholas Clark Date: Mon, 26 Dec 2005 23:48:00 +0000 (+0000) Subject: Support type UNDEF, and correct a bug in the macro generation by using X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0fcb9a02a3987f84b772f7d6b9f6581b0e1c75c4;p=p5sagit%2Fp5-mst-13.2.git Support type UNDEF, and correct a bug in the macro generation by using macro_from_item. p4raw-id: //depot/perl@26496 --- diff --git a/lib/ExtUtils/Constant/ProxySubs.pm b/lib/ExtUtils/Constant/ProxySubs.pm index d8a7c2a..921da9a 100644 --- a/lib/ExtUtils/Constant/ProxySubs.pm +++ b/lib/ExtUtils/Constant/ProxySubs.pm @@ -47,6 +47,7 @@ $VERSION = '0.01'; PVN => sub { "newSVpvn($_[0], $_[1])" }, YES => sub { '&PL_sv_yes' }, NO => sub { '&PL_sv_no' }, + UNDEF => sub { '&PL_sv_undef' }, '' => sub { '&PL_sv_yes' }, SV => sub {"SvREFCNT_inc($_[0])"}, ); @@ -55,6 +56,7 @@ $VERSION = '0.01'; ( YES => sub {}, NO => sub {}, + UNDEF => sub {}, '' => sub {}, ); @@ -106,7 +108,7 @@ sub partition_names { # It can be "not found" unless it's the default (invert the macro) # or the "macro" is an empty string (ie no macro) push @notfound, $item unless $item->{invert_macro} - or !$self->macro_to_ifdef($self->macro_from_name($item)); + or !$self->macro_to_ifdef($self->macro_from_item($item)); } if ($item->{pre} or $item->{post} or $item->{not_constant} @@ -154,7 +156,7 @@ sub name_len_value_macro { } $name = C_stringify($name); - my $macro = $self->macro_from_name($item); + my $macro = $self->macro_from_item($item); ($name, $namelen, $value, $macro); }