@@ -238,6 +238,11 @@ BEGIN { $build_subclass->('', # parent
238
238
' map_interface_name_short_to_original' , # Hash: for each INTERFACE
239
239
# name, map the short (PREFIX removed) name
240
240
# to the original name.
241
+
242
+ ' attributes' , # Array of strings: all ATTRIBUTE keywords
243
+ # (possibly multiple space-separated
244
+ # keywords per string).
245
+
241
246
)};
242
247
243
248
@@ -543,12 +548,13 @@ EOF
543
548
$pxs -> {need_boot_cv } = 1;
544
549
}
545
550
}
546
- elsif (@{ $pxs -> {xsub_attributes } }) {
551
+ elsif ($pxs -> {cur_xsub }{ attributes }) {
547
552
# Generate a standard newXS() call, plus a single call to
548
553
# apply_attrs_string() call with the string of attributes.
554
+ my $attrs = " @{$pxs ->{cur_xsub}{attributes}}" ;
549
555
push (@code , ExtUtils::ParseXS::Q(<<"EOF" ));
550
556
| cv = $newXS (\" $pname \" , XS_$cname$file_arg$proto_arg );
551
- | apply_attrs_string("$pxs ->{PACKAGE_name}", cv, "@{ $pxs ->{xsub_attributes} } ", 0);
557
+ | apply_attrs_string("$pxs ->{PACKAGE_name}", cv, "$attrs ", 0);
552
558
EOF
553
559
$pxs -> {need_boot_cv } = 1;
554
560
}
@@ -3227,7 +3233,7 @@ BEGIN { $build_subclass->('multiline', # parent
3227
3233
3228
3234
3229
3235
# Read each lines's worth of attributes into a string that is pushed
3230
- # to the {xsub_attributes } array. Note that it doesn't matter that multiple
3236
+ # to the $xsub->{attributes } array. Note that it doesn't matter that multiple
3231
3237
# space-separated attributes on the same line are stored as a single
3232
3238
# string; later, all the attribute lines are joined together into a single
3233
3239
# string to pass to apply_attrs_string().
@@ -3239,7 +3245,7 @@ sub parse {
3239
3245
$self -> SUPER::parse($pxs ); # set file/line_no, get lines
3240
3246
for (@{$self -> {lines }}) {
3241
3247
ExtUtils::ParseXS::Utilities::trim_whitespace($_ );
3242
- push @{ $pxs -> {xsub_attributes } }, $_ ;
3248
+ push @{$pxs -> {cur_xsub }{ attributes } }, $_ ;
3243
3249
}
3244
3250
1;
3245
3251
}
0 commit comments