diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-23 00:37:04 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-23 00:37:04 +0000 |
commit | 2ebbb0c37e2208c771091cac60cafb6a2767248b (patch) | |
tree | 149049b0399843578c5bf36560aee04cb2a0f2d1 /lib/ExtUtils | |
parent | b91b8403bb67d1c94fd711a2cfe83ea91f52e170 (diff) | |
download | perl-2ebbb0c37e2208c771091cac60cafb6a2767248b.tar.gz |
Use inlineable proxy constant subs for Socket
p4raw-id: //depot/perl@26463
Diffstat (limited to 'lib/ExtUtils')
-rw-r--r-- | lib/ExtUtils/Constant/ProxySubs.pm | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/ExtUtils/Constant/ProxySubs.pm b/lib/ExtUtils/Constant/ProxySubs.pm index 95b5e59b66..116e2dc802 100644 --- a/lib/ExtUtils/Constant/ProxySubs.pm +++ b/lib/ExtUtils/Constant/ProxySubs.pm @@ -39,6 +39,7 @@ $VERSION = '0.01'; YES => sub { '&PL_sv_yes' }, NO => sub { '&PL_sv_no' }, '' => sub { '&PL_sv_yes' }, + SV => sub {"SvREFCNT_inc($_[0])"}, ); %type_to_C_value = @@ -55,6 +56,7 @@ sub type_to_C_value { %type_is_a_problem = ( + # The documentation says *mortal SV*, but we now need a non-mortal copy. SV => 1, ); @@ -278,10 +280,14 @@ EOBOOT die "Can't find generator code for type $type" unless defined $generator; + print $xs_fh " {\n"; + print $xs_fh " $item->{pre}\n" if $item->{pre}; printf $xs_fh <<"EOBOOT", $name, &$generator(&$type_to_value($value)); - ${c_subname}_add_symbol($athx symbol_table, "%s", - $namelen, %s); + ${c_subname}_add_symbol($athx symbol_table, "%s", + $namelen, %s); EOBOOT + print $xs_fh " $item->{post}\n" if $item->{post}; + print $xs_fh " }\n"; print $xs_fh $self->macro_to_endif($macro); } |