Skip to content

Commit effafc6

Browse files
committed
ParseXS: refactor: sort Node::Param fields
Sort the field declaration lines for E::P::Node::Param into a more logical order.
1 parent 88f0de5 commit effafc6

File tree

1 file changed

+17
-10
lines changed
  • dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS

1 file changed

+17
-10
lines changed

dist/ExtUtils-ParseXS/lib/ExtUtils/ParseXS/Node.pm

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,25 +88,32 @@ BEGIN {
8888

8989
our @FIELDS = (
9090
@ExtUtils::ParseXS::Node::FIELDS,
91-
'type', # The C type of the parameter
92-
'arg_num', # The arg number (starting at 1) mapped to this param
91+
92+
# values derived from the XSUB's signature
93+
'in_out', # The IN/OUT/OUTLIST etc value (if any)
9394
'var', # the name of the parameter
95+
'arg_num', # The arg number (starting at 1) mapped to this param
9496
'default', # default value (if any)
9597
'default_usage', # how to report default value in "usage:..." error
96-
'proto', # overridden prototype char(s) (if any) from typemap
97-
'in_out', # The IN/OUT/OUTLIST etc value (if any)
98-
'defer', # deferred initialisation template code
99-
'init', # initialisation template code
100-
'init_op', # initialisation type: one of =/+/;
101-
'no_init', # don't initialise the parameter
102-
'is_addr', # INPUT var declared as '&foo'
10398
'is_ansi', # param's type was specified in signature
10499
'is_length', # param is declared as 'length(foo)' in signature
105100
'len_name' , # the 'foo' in 'length(foo)' in signature
106-
'is_alien', # var declared in INPUT line, but not in signature
107101
'is_synthetic',# var like 'THIS' - we pretend it was in the sig
102+
103+
# values derived from both the XSUB's signature and/or INPUT line
104+
'type', # The C type of the parameter
105+
'no_init', # don't initialise the parameter
106+
107+
# values derived from the XSUB's INPUT line
108+
'init_op', # initialisation type: one of =/+/;
109+
'init', # initialisation template code
110+
'is_addr', # INPUT var declared as '&foo'
111+
'is_alien', # var declared in INPUT line, but not in signature
108112
'in_input', # the parameter has appeared in an INPUT statement
109113

114+
# derived values calculated later
115+
'defer', # deferred initialisation template code
116+
'proto', # overridden prototype char(s) (if any) from typemap
110117
);
111118

112119
fields->import(@FIELDS) if $USING_FIELDS;

0 commit comments

Comments
 (0)