diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-26 23:48:00 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-26 23:48:00 +0000 |
commit | 0fcb9a02a3987f84b772f7d6b9f6581b0e1c75c4 (patch) | |
tree | 39e7d696fd04b3d914f2be191cf098ac5d59f855 /lib | |
parent | c48e04e60e0b6832c6f967240cc478d08e77d54f (diff) | |
download | perl-0fcb9a02a3987f84b772f7d6b9f6581b0e1c75c4.tar.gz |
Support type UNDEF, and correct a bug in the macro generation by using
macro_from_item.
p4raw-id: //depot/perl@26496
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ExtUtils/Constant/ProxySubs.pm | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/ExtUtils/Constant/ProxySubs.pm b/lib/ExtUtils/Constant/ProxySubs.pm index d8a7c2ab51..921da9a3f4 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); } |