@@ -908,11 +908,12 @@ BEGIN { $build_subclass->('', # parent
908
908
# $pxs->{config_allow_argtypes}
909
909
910
910
sub parse {
911
- my ExtUtils::ParseXS::Node::Param $param = shift ;
911
+ my __PACKAGE__ $self = shift ;
912
912
my ExtUtils::ParseXS $pxs = shift ;
913
913
my $params = shift ; # parent Params
914
914
my $param_text = shift ;
915
915
916
+ $self -> SUPER::parse($pxs ); # set file/line_no
916
917
$_ = $param_text ;
917
918
918
919
# Decompose parameter into its components.
@@ -941,15 +942,15 @@ sub parse {
941
942
if (/ ^ SV \s * \* $ /x ) {
942
943
# special-case SV* as a placeholder for backwards
943
944
# compatibility.
944
- $param -> {var } = ' SV *' ;
945
+ $self -> {var } = ' SV *' ;
945
946
return 1;
946
947
}
947
948
$pxs -> blurt(" Unparseable XSUB parameter: '$_ '" );
948
949
return ;
949
950
}
950
951
951
952
undef $type unless length ($type ) && $type =~ / \S / ;
952
- $param -> {var } = $name ;
953
+ $self -> {var } = $name ;
953
954
954
955
# Check for duplicates
955
956
@@ -965,15 +966,15 @@ sub parse {
965
966
# RETVAL is currently fully synthetic. Now that it has
966
967
# been declared as a parameter too, override any implicit
967
968
# RETVAL declaration. Delete the original param from the
968
- # param list and later re-add it as a parameter in it's
969
+ # param list and later re-add it as a parameter in its
969
970
# correct position.
970
971
@{$params -> {kids }} = grep $_ != $old_param , @{$params -> {kids }};
971
972
# If the param declaration includes a type, it becomes a
972
973
# real parameter. Otherwise the param is kept as
973
974
# 'semi-real' (synthetic, but with an arg_num) until such
974
975
# time as it gets a type set in INPUT, which would remove
975
976
# the synthetic/no_init.
976
- %$param = %$old_param unless defined $type ;
977
+ %$self = %$old_param unless defined $type ;
977
978
}
978
979
else {
979
980
$pxs -> blurt(
@@ -1026,17 +1027,17 @@ sub parse {
1026
1027
# and which thus don't need a matching INPUT line.
1027
1028
1028
1029
if (defined $type or $is_length ) { # 'int foo' or 'length(foo)'
1029
- @$param {qw( type is_ansi) } = ($type , 1);
1030
+ @$self {qw( type is_ansi) } = ($type , 1);
1030
1031
1031
1032
if ($is_length ) {
1032
- $param -> {no_init } = 1;
1033
- $param -> {is_length } = 1;
1034
- $param -> {len_name } = $len_name ;
1033
+ $self -> {no_init } = 1;
1034
+ $self -> {is_length } = 1;
1035
+ $self -> {len_name } = $len_name ;
1035
1036
}
1036
1037
}
1037
1038
1038
- $param -> {in_out } = $out_type if length $out_type ;
1039
- $param -> {no_init } = 1 if $out_type =~ / ^OUT/ ;
1039
+ $self -> {in_out } = $out_type if length $out_type ;
1040
+ $self -> {no_init } = 1 if $out_type =~ / ^OUT/ ;
1040
1041
1041
1042
# Process the default expression, including making the text
1042
1043
# to be used in "usage: ..." error messages.
@@ -1046,8 +1047,8 @@ sub parse {
1046
1047
# sometimes preserve the spaces either side of the '='
1047
1048
$report_def = ((defined $type or $is_length ) ? ' ' : $sp1 )
1048
1049
. " =$sp2$default " ;
1049
- $param -> {default_usage } = $report_def ;
1050
- $param -> {default } = $default ;
1050
+ $self -> {default_usage } = $report_def ;
1051
+ $self -> {default } = $default ;
1051
1052
}
1052
1053
1053
1054
1;
0 commit comments