diff options
author | Doug MacEachern <dougm@covalent.net> | 2001-02-18 04:58:23 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-02-18 22:17:54 +0000 |
commit | 8fc4b7987e6639e8be4826c029947e2c978b9a2d (patch) | |
tree | 7351ae51f93584ef95c4b46f970ce5bd0c986bc1 | |
parent | 8063af025e8b11a3a92c708534a72a8c4fe60322 (diff) | |
download | perl-8fc4b7987e6639e8be4826c029947e2c978b9a2d.tar.gz |
[patch] xsubpp: make sv_setref_* targetable
Message-ID: <Pine.LNX.4.21.0102181256310.10021-100000@mako.covalent.net>
p4raw-id: //depot/perl@8838
-rwxr-xr-x | lib/ExtUtils/xsubpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/lib/ExtUtils/xsubpp b/lib/ExtUtils/xsubpp index 2093633930..0f3d1e618f 100755 --- a/lib/ExtUtils/xsubpp +++ b/lib/ExtUtils/xsubpp @@ -274,7 +274,7 @@ foreach $key (keys %output_expr) { my ($t, $with_size, $arg, $sarg) = ($output_expr{$key} =~ - m[^ \s+ sv_set ( [iunp] ) v (n)? # Type, is_setpvn + m[^ \s+ sv_set ( [iunp] | ref_[iunp] ) v (n)? # Type, is_setpvn \s* \( \s* $cast \$arg \s* , \s* ( (??{ $bal }) ) # Set from ( (??{ $size }) )? # Possible sizeof set-from @@ -1354,6 +1354,18 @@ EOF print "\tsv_setpv(TARG, $what); XSprePUSH; PUSHTARG;\n"; $prepush_done = 1; } + elsif ($t and $t->[0] =~ /^ref_/) { + local $ntype = $ret_type; + my $what = eval qq("$t->[2]"); + warn $@ if $@; + my $size = $t->[3]; + $size = '' unless defined $size; + $size = eval qq("$size"); + my $n = $t->[1] || ''; + warn $@ if $@; + print "\tXSprePUSH; sv_set$t->[0]v$n(TARG, $what$size); PUSHTARG;\n"; + $prepush_done = 1; + } elsif ($t) { my $what = eval qq("$t->[2]"); warn $@ if $@; |