@@ -557,34 +557,34 @@ sub boot_code {
557
557
# Now use those values to append suitable newXS() and other code
558
558
# into @code, for later insertion into the boot sub.
559
559
560
- my $pname = $pxs -> { cur_xsub } {decl }{full_perl_name };
561
- my $cname = $pxs -> { cur_xsub } {decl }{full_C_name };
560
+ my $pname = $self -> {decl }{full_perl_name };
561
+ my $cname = $self -> {decl }{full_C_name };
562
562
563
- if ( $pxs -> { cur_xsub } {map_alias_name_to_value }
564
- and keys %{ $pxs -> { cur_xsub } {map_alias_name_to_value } })
563
+ if ( $self -> {map_alias_name_to_value }
564
+ and keys %{ $self -> {map_alias_name_to_value } })
565
565
{
566
566
# For the main XSUB and for each alias name, generate a newXS() call
567
567
# and 'XSANY.any_i32 = ix' line.
568
568
569
569
# Make the main name one of the aliases if it isn't already
570
- $pxs -> { cur_xsub } {map_alias_name_to_value }-> {$pname } = 0
571
- unless defined $pxs -> { cur_xsub } {map_alias_name_to_value }{$pname };
570
+ $self -> {map_alias_name_to_value }-> {$pname } = 0
571
+ unless defined $self -> {map_alias_name_to_value }{$pname };
572
572
573
573
foreach my $xname (sort keys
574
- %{ $pxs -> { cur_xsub } {map_alias_name_to_value } })
574
+ %{ $self -> {map_alias_name_to_value } })
575
575
{
576
- my $value = $pxs -> { cur_xsub } {map_alias_name_to_value }{$xname };
576
+ my $value = $self -> {map_alias_name_to_value }{$xname };
577
577
push (@code , ExtUtils::ParseXS::Q(<<"EOF" ));
578
578
| cv = $newXS (\" $xname \" , XS_$cname$file_arg$proto_arg );
579
579
| XSANY.any_i32 = $value ;
580
580
EOF
581
581
$pxs -> {need_boot_cv } = 1;
582
582
}
583
583
}
584
- elsif ($pxs -> { cur_xsub } {attributes }) {
584
+ elsif ($self -> {attributes }) {
585
585
# Generate a standard newXS() call, plus a single call to
586
586
# apply_attrs_string() call with the string of attributes.
587
- my $attrs = " @{$pxs ->{cur_xsub} {attributes}}" ;
587
+ my $attrs = " @{$self -> {attributes}}" ;
588
588
push (@code , ExtUtils::ParseXS::Q(<<"EOF" ));
589
589
| cv = $newXS (\" $pname \" , XS_$cname$file_arg$proto_arg );
590
590
| apply_attrs_string("$pxs ->{PACKAGE_name}", cv, "$attrs ", 0);
@@ -597,12 +597,12 @@ EOF
597
597
# For each interface name, generate both a newXS() and
598
598
# XSINTERFACE_FUNC_SET() call.
599
599
foreach my $yname (sort keys
600
- %{ $pxs -> { cur_xsub } {map_interface_name_short_to_original } })
600
+ %{ $self -> {map_interface_name_short_to_original } })
601
601
{
602
- my $value = $pxs -> { cur_xsub } {map_interface_name_short_to_original }{$yname };
602
+ my $value = $self -> {map_interface_name_short_to_original }{$yname };
603
603
$yname = " $pxs ->{PACKAGE_name}\: :$yname " unless $yname =~ / ::/ ;
604
604
605
- my $macro = $pxs -> { cur_xsub } {interface_macro_set };
605
+ my $macro = $self -> {interface_macro_set };
606
606
$macro = ' XSINTERFACE_FUNC_SET' unless defined $macro ;
607
607
push (@code , ExtUtils::ParseXS::Q(<<"EOF" ));
608
608
| cv = $newXS (\" $yname \" , XS_$cname$file_arg$proto_arg );
635
635
# For every overload operator, generate an additional newXS()
636
636
# call to add an alias such as "Foo::(<=>" for this XSUB.
637
637
638
- for my $operator (sort keys %{ $pxs -> { cur_xsub } {overload_name_seen } })
638
+ for my $operator (sort keys %{ $self -> {overload_name_seen } })
639
639
{
640
640
$pxs -> {map_overloaded_package_to_C_package }-> {$pxs -> {PACKAGE_name }}
641
641
= $pxs -> {PACKAGE_C_name };
@@ -950,7 +950,7 @@ sub as_code {
950
950
951
951
print " \t STRLEN\t STRLEN_length_of_$name ;\n " ;
952
952
# defer this line until after all the other declarations
953
- $pxs -> { cur_xbody } {input_part }{deferred_code_lines } .=
953
+ $xbody -> {input_part }{deferred_code_lines } .=
954
954
" \n\t XSauto_length_of_$name = STRLEN_length_of_$name ;\n " ;
955
955
956
956
# this var will be declared using the normal typemap mechanism below
@@ -1057,7 +1057,7 @@ sub as_code {
1057
1057
# on an object of the right class. Basically, for T_foo_OBJ, use
1058
1058
# T_foo_REF instead. T_REF_IV_PTR was added in v5.22.0.
1059
1059
$xstype =~ s / OBJ$/ REF/ || $xstype =~ s / ^T_REF_IV_PTR$/ T_PTRREF/
1060
- if $pxs -> { cur_xsub } {decl }{name } =~ / DESTROY$ / ;
1060
+ if $xsub -> {decl }{name } =~ / DESTROY$ / ;
1061
1061
1062
1062
# For a string-ish parameter foo, if length(foo) was also declared
1063
1063
# as a pseudo-parameter, then override the normal typedef - which
@@ -1162,7 +1162,7 @@ sub as_code {
1162
1162
if ($default eq ' NO_INIT' ) {
1163
1163
# for foo(a, b = NO_INIT), add code to initialise later only if
1164
1164
# an arg was supplied.
1165
- $pxs -> { cur_xbody } {input_part }{deferred_code_lines }
1165
+ $xbody -> {input_part }{deferred_code_lines }
1166
1166
.= sprintf " \n\t if (items >= %d ) {\n %s ;\n\t }\n " ,
1167
1167
$arg_num , $init_code ;
1168
1168
}
@@ -1172,7 +1172,7 @@ sub as_code {
1172
1172
my $else = ($init_code =~ / \S / ) ? " \t else {\n $init_code ;\n\t }\n " : " " ;
1173
1173
1174
1174
$default =~ s / "/ \\ "/ g ; # escape double quotes
1175
- $pxs -> { cur_xbody } {input_part }{deferred_code_lines }
1175
+ $xbody -> {input_part }{deferred_code_lines }
1176
1176
.= sprintf " \n\t if (items < %d )\n\t %s = %s ;\n %s " ,
1177
1177
$arg_num ,
1178
1178
$var ,
@@ -1190,7 +1190,7 @@ sub as_code {
1190
1190
1191
1191
print " ;\n " ;
1192
1192
1193
- $pxs -> { cur_xbody } {input_part }{deferred_code_lines }
1193
+ $xbody -> {input_part }{deferred_code_lines }
1194
1194
.= sprintf " \n %s ;\n " , $init_code
1195
1195
if $init_code =~ / \S / ;
1196
1196
}
@@ -1205,7 +1205,7 @@ sub as_code {
1205
1205
}
1206
1206
1207
1207
if (defined $defer ) {
1208
- $pxs -> { cur_xbody } {input_part }{deferred_code_lines }
1208
+ $xbody -> {input_part }{deferred_code_lines }
1209
1209
.= $pxs -> eval_input_typemap_code(" qq\a $defer \a " , $eval_vars ) . " \n " ;
1210
1210
}
1211
1211
}
@@ -3581,7 +3581,7 @@ sub as_code {
3581
3581
3582
3582
$self -> SUPER::as_code($pxs , $xsub , $xbody ); # emit code block
3583
3583
3584
- print " \t LEAVE;\n " if $pxs -> { cur_xsub } {SCOPE_enabled };
3584
+ print " \t LEAVE;\n " if $xsub -> {SCOPE_enabled };
3585
3585
3586
3586
# Suppress "statement is unreachable" warning on HPUX
3587
3587
print " #if defined(__HP_cc) || defined(__HP_aCC)\n " ,
0 commit comments