From b23f32cff25432e8416fe9da0740c6bcd51f9dae Mon Sep 17 00:00:00 2001 From: "James E. Keenan" Date: Sun, 28 Mar 2010 21:22:23 -0400 Subject: [PATCH] Move $RETVAL_code into $self. --- dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm index 218e8d3..a5ca2d0 100644 --- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm +++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm @@ -42,7 +42,7 @@ our ( @line_no, %XsubAliases, %XsubAliasValues, %Interfaces, @Attributes, %outargs, $condnum, $cond, - $RETVAL_code, $func_args, @XSStack, $ALIAS, + $func_args, @XSStack, $ALIAS, ); our ($DoSetMagic, $newXS, $proto, $Module_cname, $XsubAliases, $Interfaces, $var_num, ); @@ -763,7 +763,7 @@ EOF # do output variables $self->{gotRETVAL} = 0; # 1 if RETVAL seen in OUTPUT section; - undef $RETVAL_code ; # code to set RETVAL (from OUTPUT section); + undef $self->{RETVAL_code} ; # code to set RETVAL (from OUTPUT section); # $wantRETVAL set if 'RETVAL =' autogenerated ($wantRETVAL, $self->{ret_type}) = (0, 'void') if $RETVAL_no_return; undef %outargs; @@ -778,8 +778,8 @@ EOF } ) for grep $in_out{$_} =~ /OUT$/, keys %in_out; # all OUTPUT done, so now push the return value on the stack - if ($self->{gotRETVAL} && $RETVAL_code) { - print "\t$RETVAL_code\n"; + if ($self->{gotRETVAL} && $self->{RETVAL_code}) { + print "\t$self->{RETVAL_code}\n"; } elsif ($self->{gotRETVAL} || $wantRETVAL) { my $t = $args{optimize} && $targetable{$type_kind{$self->{ret_type}}}; @@ -1228,7 +1228,7 @@ sub OUTPUT_handler { if $outargs{$outarg}++; if (!$self->{gotRETVAL} and $outarg eq 'RETVAL') { # deal with RETVAL last - $RETVAL_code = $outcode; + $self->{RETVAL_code} = $outcode; $self->{gotRETVAL} = 1; next; } -- 2.7.4