Skip to content

Commit

Permalink
CC: G_ARRAY was deprecated
Browse files Browse the repository at this point in the history
use G_LIST instead
  • Loading branch information
rurban authored and Reinhard Urban committed Sep 26, 2022
1 parent 862bdf2 commit 6a43dc0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
8 changes: 7 additions & 1 deletion lib/B/CC.pm
Expand Up @@ -313,7 +313,7 @@ use B qw(main_start main_root comppadlist peekop svref_2object
OPf_WANT_VOID OPf_WANT_SCALAR OPf_WANT_LIST OPf_WANT
OPf_MOD OPf_STACKED OPf_SPECIAL OPpLVAL_DEFER OPpLVAL_INTRO
OPpASSIGN_BACKWARDS OPpLVAL_INTRO OPpDEREF_AV OPpDEREF_HV
OPpDEREF OPpFLIP_LINENUM G_VOID G_SCALAR G_ARRAY);
OPpDEREF OPpFLIP_LINENUM G_VOID G_SCALAR);
#CXt_NULL CXt_SUB CXt_EVAL CXt_SUBST CXt_BLOCK
use B::C qw(save_unused_subs objsym init_sections mark_unused mark_skip
output_all output_boilerplate output_main output_main_rest fixup_ppaddr
Expand Down Expand Up @@ -435,6 +435,12 @@ BEGIN {
} else { # 5.10. not used with <= 5.8
eval q[sub PMf_ONCE(){ 0x0002 }];
}
if ($] >= 5.036) {
B->import('G_LIST');
eval "sub G_ARRAY {G_LIST};";
} else {
B->import('G_ARRAY');
}
}

# Could rewrite push_runtime() and output_runtime() to use a
Expand Down
4 changes: 4 additions & 0 deletions t/TestBC.pm
Expand Up @@ -1095,6 +1095,10 @@ my $s=q{ok};END{print $s}END{$x = 0}
>>>>
ok
######### 106 CC 296/297 ###############################
hi(); sub hi{ print q{ok}; }
>>>>
ok
######### 107 CC sub 491 ###############################
CCTESTS

my $i = 100;
Expand Down

0 comments on commit 6a43dc0

Please sign in to comment.