@@ -378,7 +378,7 @@ sub parse {
378
378
grep { defined $_ -> {in_out }
379
379
&& $_ -> {in_out } =~ / OUTLIST$ /
380
380
}
381
- @{$self -> {decl }{params }{params }};
381
+ @{$self -> {decl }{params }{kids }};
382
382
1;
383
383
}
384
384
@@ -1792,9 +1792,11 @@ package ExtUtils::ParseXS::Node::Params;
1792
1792
# It is a mainly a list of Node::Param children.
1793
1793
1794
1794
BEGIN { $build_subclass -> (' ' , # parent
1795
- ' params' , # Array ref of Node::Param objects representing
1795
+
1796
+ # inherited 'kids' field:
1797
+ # Array ref of Node::Param objects representing
1796
1798
# the parameters of this XSUB - either the
1797
- # original ones as seen in thre XSUB's signature,
1799
+ # original ones as seen in the XSUB's signature,
1798
1800
# or per-xbody ones augmented by info from INPUT
1799
1801
# and OUTPUT sections.
1800
1802
@@ -1927,7 +1929,7 @@ sub parse {
1927
1929
is_synthetic => 1,
1928
1930
arg_num => ++$nargs ,
1929
1931
});
1930
- push @{$self -> {params }}, $param ;
1932
+ push @{$self -> {kids }}, $param ;
1931
1933
$self -> {names }{$var } = $param ;
1932
1934
}
1933
1935
@@ -1943,7 +1945,7 @@ sub parse {
1943
1945
#
1944
1946
# semi-real Same as fully-synthetic, but with a defined
1945
1947
# arg_num, and with an updated position within
1946
- # @{$self->{params }}.
1948
+ # @{$self->{kids }}.
1947
1949
# A RETVAL has appeared in the signature, but
1948
1950
# without a type yet specified, so it continues to
1949
1951
# use $xsub->{decl}{return_type}{type}.
@@ -1961,7 +1963,7 @@ sub parse {
1961
1963
is_synthetic => 1,
1962
1964
} );
1963
1965
1964
- push @{$self -> {params }}, $param ;
1966
+ push @{$self -> {kids }}, $param ;
1965
1967
$self -> {names }{RETVAL } = $param ;
1966
1968
}
1967
1969
@@ -2022,7 +2024,7 @@ sub parse {
2022
2024
if (/ ^ SV \s * \* $ /x ) {
2023
2025
# special-case SV* as a placeholder for backwards
2024
2026
# compatibility.
2025
- push @{$self -> {params }},
2027
+ push @{$self -> {kids }},
2026
2028
ExtUtils::ParseXS::Node::Param-> new( {
2027
2029
var => ' SV *' ,
2028
2030
arg_num => ++$nargs ,
@@ -2053,7 +2055,7 @@ sub parse {
2053
2055
# been declared as a parameter too, override any implicit
2054
2056
# RETVAL declaration. Delete the original param from the
2055
2057
# param list.
2056
- @{$self -> {params }} = grep $_ != $old_param , @{$self -> {params }};
2058
+ @{$self -> {kids }} = grep $_ != $old_param , @{$self -> {kids }};
2057
2059
# If the param declaration includes a type, it becomes a
2058
2060
# real parameter. Otherwise the param is kept as
2059
2061
# 'semi-real' (synthetic, but with an arg_num) until such
@@ -2068,7 +2070,7 @@ sub parse {
2068
2070
}
2069
2071
}
2070
2072
2071
- push @{$self -> {params }}, $param ;
2073
+ push @{$self -> {kids }}, $param ;
2072
2074
$self -> {names }{$name } = $param ;
2073
2075
2074
2076
# Process optional IN/OUT etc modifier
@@ -2153,7 +2155,7 @@ sub parse {
2153
2155
2154
2156
# for each parameter of the form 'length(foo)', mark the corresponding
2155
2157
# 'foo' parameter as 'has_length', or error out if foo not found.
2156
- for my $param (@{$self -> {params }}) {
2158
+ for my $param (@{$self -> {kids }}) {
2157
2159
next unless $param -> {is_length };
2158
2160
my $name = $param -> {len_name };
2159
2161
if (exists $self -> {names }{$name }) {
@@ -2183,7 +2185,7 @@ sub usage_string {
2183
2185
grep {
2184
2186
defined $_ -> {arg_num },
2185
2187
}
2186
- @{$self -> {params }};
2188
+ @{$self -> {kids }};
2187
2189
2188
2190
push @args , ' ...' if $self -> {seen_ellipsis };
2189
2191
return join ' , ' , @args ;
@@ -2200,7 +2202,7 @@ sub C_func_signature {
2200
2202
my ExtUtils::ParseXS $pxs = shift ;
2201
2203
2202
2204
my @args ;
2203
- for my $param (@{$self -> {params }}) {
2205
+ for my $param (@{$self -> {kids }}) {
2204
2206
next if $param -> {is_synthetic } # THIS/CLASS/RETVAL
2205
2207
# if a synthetic RETVAL has acquired an arg_num, then
2206
2208
# it's appeared in the signature (although without a
@@ -2248,7 +2250,7 @@ sub proto_string {
2248
2250
# overridden entry.
2249
2251
my @p = map defined $_ -> {proto } ? $_ -> {proto } : ' $' ,
2250
2252
grep defined $_ -> {arg_num } && $_ -> {arg_num } > 0,
2251
- @{$self -> {params }};
2253
+ @{$self -> {kids }};
2252
2254
2253
2255
my @sep = (' ;' ); # separator between required and optional args
2254
2256
my $min = $self -> {min_args };
@@ -2319,15 +2321,15 @@ sub parse {
2319
2321
# now duplicate (deep copy) any Param objects and regenerate a new
2320
2322
# names-mapping hash
2321
2323
2322
- $ioparams -> {params } = [];
2324
+ $ioparams -> {kids } = [];
2323
2325
$ioparams -> {names } = {};
2324
2326
2325
- for my $op (@{$orig -> {params }}) {
2327
+ for my $op (@{$orig -> {kids }}) {
2326
2328
my $p = ExtUtils::ParseXS::Node::Param-> new($op );
2327
2329
# don't copy the current proto state (from the most recent
2328
2330
# CASE) into the new CASE.
2329
2331
undef $p -> {proto };
2330
- push @{$ioparams -> {params }}, $p ;
2332
+ push @{$ioparams -> {kids }}, $p ;
2331
2333
$ioparams -> {names }{$p -> {var }} = $p ;
2332
2334
}
2333
2335
@@ -2448,7 +2450,7 @@ sub parse {
2448
2450
# also use that value to update the per-XSUB value, warning if the
2449
2451
# value changes.
2450
2452
2451
- for my $ioparam (@{$xbody -> {ioparams }{params }}) {
2453
+ for my $ioparam (@{$xbody -> {ioparams }{kids }}) {
2452
2454
$ioparam -> set_proto($pxs );
2453
2455
my $ioproto = $ioparam -> {proto };
2454
2456
my $name = $ioparam -> {var };
@@ -2493,7 +2495,7 @@ EOF
2493
2495
2494
2496
# Emit any 'char * CLASS' or 'Foo::Bar *THIS' declaration if needed
2495
2497
2496
- for my $param (grep $_ -> {is_synthetic }, @{$ioparams -> {params }}) {
2498
+ for my $param (grep $_ -> {is_synthetic }, @{$ioparams -> {kids }}) {
2497
2499
$param -> as_code($pxs , $xsub , $xbody );
2498
2500
}
2499
2501
@@ -2511,8 +2513,8 @@ EOF
2511
2513
for my $param (
2512
2514
grep $_ -> {is_ansi },
2513
2515
(
2514
- grep ( $_ -> {is_length }, @{$ioparams -> {params }} ),
2515
- grep (! $_ -> {is_length }, @{$ioparams -> {params }} ),
2516
+ grep ( $_ -> {is_length }, @{$ioparams -> {kids }} ),
2517
+ grep (! $_ -> {is_length }, @{$ioparams -> {kids }} ),
2516
2518
)
2517
2519
)
2518
2520
@@ -2703,7 +2705,7 @@ sub as_code {
2703
2705
&& $_ -> {in_out } =~ / OUT$ /
2704
2706
&& !$_ -> {in_output }
2705
2707
}
2706
- @{$ioparams -> {params }})
2708
+ @{$ioparams -> {kids }})
2707
2709
{
2708
2710
$param -> as_output_code($pxs , $xsub , $xbody );
2709
2711
}
@@ -2745,7 +2747,7 @@ sub as_code {
2745
2747
for my $param (grep { defined $_ -> {in_out }
2746
2748
&& $_ -> {in_out } =~ / OUTLIST$ /
2747
2749
}
2748
- @{$ioparams -> {params }}
2750
+ @{$ioparams -> {kids }}
2749
2751
) {
2750
2752
$param -> as_output_code($pxs , $xsub , $xbody , $basic ++);
2751
2753
}
@@ -4088,9 +4090,9 @@ sub parse {
4088
4090
# type, and has already been moved to the correct position;
4089
4091
# otherwise, it's an alien var that didn't appear in the
4090
4092
# signature; move to the correct position.
4091
- @{$ioparams -> {params }} =
4092
- grep $_ != $param , @{$ioparams -> {params }};
4093
- push @{$ioparams -> {params }}, $param ;
4093
+ @{$ioparams -> {kids }} =
4094
+ grep $_ != $param , @{$ioparams -> {kids }};
4095
+ push @{$ioparams -> {kids }}, $param ;
4094
4096
$is_alien = 1;
4095
4097
$param -> {is_alien } = 1;
4096
4098
}
@@ -4109,7 +4111,7 @@ sub parse {
4109
4111
is_alien => 1,
4110
4112
});
4111
4113
4112
- push @{$ioparams -> {params }}, $param ;
4114
+ push @{$ioparams -> {kids }}, $param ;
4113
4115
$ioparams -> {names }{$var_name } = $param ;
4114
4116
}
4115
4117
0 commit comments