@@ -4225,7 +4225,7 @@ package ExtUtils::ParseXS::Node::INPUT_line;
4225
4225
# Handle one line from an INPUT keyword block
4226
4226
4227
4227
BEGIN { $build_subclass -> (parent => ' keyline' ,
4228
- ' param ' , # The IO_Param object associated with this INPUT line.
4228
+ ' ioparam ' , # The IO_Param object associated with this INPUT line.
4229
4229
4230
4230
# The parsed components of this INPUT line:
4231
4231
' type' , # Str: char *
@@ -4320,9 +4320,10 @@ sub parse {
4320
4320
4321
4321
my $ioparams = $xbody -> {ioparams };
4322
4322
4323
- my ExtUtils::ParseXS::Node::IO_Param $param = $ioparams -> {names }{$var_name };
4323
+ my ExtUtils::ParseXS::Node::IO_Param $ioparam =
4324
+ $ioparams -> {names }{$var_name };
4324
4325
4325
- if (defined $param ) {
4326
+ if (defined $ioparam ) {
4326
4327
# The var appeared in the signature too.
4327
4328
4328
4329
# Check for duplicate definitions of a particular parameter name.
@@ -4331,52 +4332,52 @@ sub parse {
4331
4332
# and thus shouldn't be defined again. The exception to this are
4332
4333
# synthetic params like THIS, which are assigned a provisional type
4333
4334
# which can be overridden.
4334
- if ( $param -> {in_input }
4335
- or (!$param -> {is_synthetic } and defined $param -> {type })
4335
+ if ( $ioparam -> {in_input }
4336
+ or (!$ioparam -> {is_synthetic } and defined $ioparam -> {type })
4336
4337
) {
4337
4338
$pxs -> blurt(
4338
4339
" Error: duplicate definition of parameter '$var_name ' ignored" );
4339
4340
return ;
4340
4341
}
4341
4342
4342
- if ($var_name eq ' RETVAL' and $param -> {is_synthetic }) {
4343
+ if ($var_name eq ' RETVAL' and $ioparam -> {is_synthetic }) {
4343
4344
# Convert a synthetic RETVAL into a real parameter
4344
- delete $param -> {is_synthetic };
4345
- delete $param -> {no_init };
4346
- if (! defined $param -> {arg_num }) {
4345
+ delete $ioparam -> {is_synthetic };
4346
+ delete $ioparam -> {no_init };
4347
+ if (! defined $ioparam -> {arg_num }) {
4347
4348
# if has arg_num, RETVAL has appeared in signature but with no
4348
4349
# type, and has already been moved to the correct position;
4349
4350
# otherwise, it's an alien var that didn't appear in the
4350
4351
# signature; move to the correct position.
4351
4352
@{$ioparams -> {kids }} =
4352
- grep $_ != $param , @{$ioparams -> {kids }};
4353
- push @{$ioparams -> {kids }}, $param ;
4354
- $is_alien = 1;
4355
- $param -> {is_alien } = 1;
4353
+ grep $_ != $ioparam , @{$ioparams -> {kids }};
4354
+ push @{$ioparams -> {kids }}, $ioparam ;
4355
+ $is_alien = 1;
4356
+ $ioparam -> {is_alien } = 1;
4356
4357
}
4357
4358
}
4358
4359
4359
- $param -> {in_input } = 1;
4360
- $var_num = $param -> {arg_num };
4360
+ $ioparam -> {in_input } = 1;
4361
+ $var_num = $ioparam -> {arg_num };
4361
4362
}
4362
4363
else {
4363
4364
# The var is in an INPUT line, but not in signature. Treat it as a
4364
4365
# general var declaration (which really should have been in a
4365
4366
# PREINIT section). Legal but nasty: flag is as 'alien'
4366
4367
$is_alien = 1;
4367
- $param = ExtUtils::ParseXS::Node::IO_Param-> new({
4368
+ $ioparam = ExtUtils::ParseXS::Node::IO_Param-> new({
4368
4369
var => $var_name ,
4369
4370
is_alien => 1,
4370
4371
});
4371
4372
4372
- push @{$ioparams -> {kids }}, $param ;
4373
- $ioparams -> {names }{$var_name } = $param ;
4373
+ push @{$ioparams -> {kids }}, $ioparam ;
4374
+ $ioparams -> {names }{$var_name } = $ioparam ;
4374
4375
}
4375
4376
4376
4377
# Parse the initialisation part of the INPUT line (if any)
4377
4378
4378
4379
my ($init , $defer );
4379
- my $no_init = $param -> {no_init }; # may have had OUT in signature
4380
+ my $no_init = $ioparam -> {no_init }; # may have had OUT in signature
4380
4381
4381
4382
if (!$no_init && defined $init_op ) {
4382
4383
# Use the init code based on overridden $var_init, which was
@@ -4420,12 +4421,12 @@ sub parse {
4420
4421
$self -> {name } = $var_name ,
4421
4422
$self -> {init_op } = $init_op ,
4422
4423
$self -> {init } = $var_init ,
4423
- $self -> {param } = $param ;
4424
+ $self -> {ioparam } = $ioparam ;
4424
4425
4425
- # and also update the param object using that information
4426
+ # and also update the ioparam object using that information
4426
4427
4427
- %$param = (
4428
- %$param ,
4428
+ %$ioparam = (
4429
+ %$ioparam ,
4429
4430
type => $var_type ,
4430
4431
arg_num => $var_num ,
4431
4432
var => $var_name ,
@@ -4449,14 +4450,14 @@ sub as_code {
4449
4450
# Emit "type var" declaration and possibly various forms of
4450
4451
# initialiser code.
4451
4452
4452
- my $ioparam = $self -> {param };
4453
+ my $ioparam = $self -> {ioparam };
4453
4454
4454
4455
# Synthetic params like THIS will be emitted later - they
4455
4456
# are treated like ANSI params, except the type can overridden
4456
4457
# within an INPUT statement
4457
4458
return if $ioparam -> {is_synthetic };
4458
4459
4459
- # The param object contains data from both the INPUT line and
4460
+ # The ioparam object contains data from both the INPUT line and
4460
4461
# the XSUB signature.
4461
4462
$ioparam -> as_input_code($pxs , $xsub , $xbody );
4462
4463
}
@@ -4481,7 +4482,7 @@ package ExtUtils::ParseXS::Node::OUTPUT_line;
4481
4482
# Handle one line from an OUTPUT keyword block
4482
4483
4483
4484
BEGIN { $build_subclass -> (parent => ' keyline' ,
4484
- ' param ' , # the IO_Param object associated with this OUTPUT line.
4485
+ ' ioparam ' , # the IO_Param object associated with this OUTPUT line.
4485
4486
' is_setmagic' , # Bool: the line is a SETMAGIC: line
4486
4487
' do_setmagic' , # Bool: the current SETMAGIC state
4487
4488
' name' , # Str: name of the parameter to output
@@ -4524,11 +4525,11 @@ sub parse {
4524
4525
4525
4526
$self -> {name } = $outarg ;
4526
4527
4527
- my ExtUtils::ParseXS::Node::IO_Param $param =
4528
+ my ExtUtils::ParseXS::Node::IO_Param $ioparam =
4528
4529
$xbody -> {ioparams }{names }{$outarg };
4529
- $self -> {param } = $param ;
4530
+ $self -> {ioparam } = $ioparam ;
4530
4531
4531
- if ($param && $param -> {in_output }) {
4532
+ if ($ioparam && $ioparam -> {in_output }) {
4532
4533
$pxs -> blurt(" Error: duplicate OUTPUT parameter '$outarg ' ignored" );
4533
4534
return ;
4534
4535
}
@@ -4541,19 +4542,19 @@ sub parse {
4541
4542
return ;
4542
4543
}
4543
4544
4544
- if ( ! $param # no such param or, for RETVAL, RETVAL was void
4545
- # not bound to an arg which can be updated
4546
- or $outarg ne " RETVAL" && !$param -> {arg_num })
4545
+ if ( ! $ioparam # no such param or, for RETVAL, RETVAL was void;
4546
+ # not bound to an arg which can be updated
4547
+ or $outarg ne " RETVAL" && !$ioparam -> {arg_num })
4547
4548
{
4548
4549
$pxs -> blurt(" Error: OUTPUT $outarg not a parameter" );
4549
4550
return ;
4550
4551
}
4551
4552
4552
- $param -> {in_output } = 1;
4553
- $param -> {do_setmagic } = $outarg eq ' RETVAL'
4553
+ $ioparam -> {in_output } = 1;
4554
+ $ioparam -> {do_setmagic } = $outarg eq ' RETVAL'
4554
4555
? 0 # RETVAL never needs magic setting
4555
4556
: $xbody -> {OUTPUT_SETMAGIC_state };
4556
- $self -> {code } = $param -> {output_code } = $outcode if length $outcode ;
4557
+ $self -> {code } = $ioparam -> {output_code } = $outcode if length $outcode ;
4557
4558
4558
4559
1;
4559
4560
}
@@ -4597,10 +4598,10 @@ sub as_code {
4597
4598
4598
4599
return if $self -> {name } eq ' RETVAL' ;
4599
4600
4600
- my $param = $self -> {param };
4601
- return unless $param ; # might be an ENABLE line with no param to emit
4601
+ my $ioparam = $self -> {ioparam };
4602
+ return unless $ioparam ; # might be an ENABLE line with no param to emit
4602
4603
4603
- $param -> as_output_code($pxs );
4604
+ $ioparam -> as_output_code($pxs );
4604
4605
}
4605
4606
4606
4607
0 commit comments