summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorTony Cook <tony@develop-help.com>2021-09-09 11:04:05 +1000
committerTony Cook <tony@develop-help.com>2021-09-13 10:05:03 +1000
commitf572f0830b491cf42d95232aa4755d9106e0e3f1 (patch)
tree8d6338c7df114dea31cbd060b0743d7de7765f5d /dist
parent2adc92a0e8937b18cd278515281fd462a5edf08e (diff)
downloadperl-f572f0830b491cf42d95232aa4755d9106e0e3f1.tar.gz
ParseXS: rename $c to $outlist_count
$c could be a count, but a count of what? clarify it.
Diffstat (limited to 'dist')
-rw-r--r--dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm16
1 files changed, 8 insertions, 8 deletions
diff --git a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
index f4edf959f9..c3e8220e32 100644
--- a/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
+++ b/dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS.pm
@@ -690,9 +690,9 @@ EOF
do_push => undef,
} ) for grep $self->{in_out}->{$_} =~ /OUT$/, sort keys %{ $self->{in_out} };
- my $c = @{ $outlist_ref };
- if ($c) {
- my $ext = $c;
+ my $outlist_count = @{ $outlist_ref };
+ if ($outlist_count) {
+ my $ext = $outlist_count;
++$ext if $self->{gotRETVAL} || $wantRETVAL;
print "\tXSprePUSH;";
print "\tEXTEND(SP,$ext);\n";
@@ -700,7 +700,7 @@ EOF
# all OUTPUT done, so now push the return value on the stack
if ($self->{gotRETVAL} && $self->{RETVAL_code}) {
print "\t$self->{RETVAL_code}\n";
- print "\t++SP;\n" if $c;
+ print "\t++SP;\n" if $outlist_count;
}
elsif ($self->{gotRETVAL} || $wantRETVAL) {
my $outputmap = $self->{typemap}->get_outputmap( ctype => $self->{ret_type} );
@@ -716,7 +716,7 @@ EOF
if (not $trgt->{with_size} and $trgt->{type} eq 'p') { # sv_setpv
# PUSHp corresponds to sv_setpvn. Treat sv_setpv directly
print "\tsv_setpv(TARG, $what);\n";
- print "\tXSprePUSH;\n" unless $c;
+ print "\tXSprePUSH;\n" unless $outlist_count;
print "\tPUSHTARG;\n";
}
else {
@@ -726,7 +726,7 @@ EOF
qq("$tsize"),
{var => $var, type => $self->{ret_type}}
);
- print "\tXSprePUSH;\n" unless $c;
+ print "\tXSprePUSH;\n" unless $outlist_count;
print "\tPUSH$trgt->{type}($what$tsize);\n";
}
}
@@ -739,13 +739,13 @@ EOF
do_setmagic => 0,
do_push => undef,
} );
- print "\t++SP;\n" if $c;
+ print "\t++SP;\n" if $outlist_count;
}
}
$xsreturn = 1 if $self->{ret_type} ne "void";
my $num = $xsreturn;
- $xsreturn += $c;
+ $xsreturn += $outlist_count;
$self->generate_output( {
type => $self->{var_types}->{$_},
num => $num++,