@@ -2473,18 +2473,18 @@ PP(pp_return)
2473
2473
}
2474
2474
}
2475
2475
2476
- /* find the enclosing loop or labelled loop and dounwind() back to it.
2477
- * opname is for errors */
2476
+ /* find the enclosing loop or labelled loop and dounwind() back to it. */
2478
2477
2479
2478
PERL_CONTEXT *
2480
- S_unwind_loop (pTHX_ const char * const opname )
2479
+ S_unwind_loop (pTHX )
2481
2480
{
2482
2481
I32 cxix ;
2483
2482
if (PL_op -> op_flags & OPf_SPECIAL ) {
2484
2483
cxix = dopoptoloop (cxstack_ix );
2485
2484
if (cxix < 0 )
2486
2485
/* diag_listed_as: Can't "last" outside a loop block */
2487
- Perl_croak (aTHX_ "Can't \"%s\" outside a loop block" , opname );
2486
+ Perl_croak (aTHX_ "Can't \"%s\" outside a loop block" ,
2487
+ OP_NAME (PL_op ));
2488
2488
}
2489
2489
else {
2490
2490
dSP ;
@@ -2502,7 +2502,7 @@ S_unwind_loop(pTHX_ const char * const opname)
2502
2502
if (cxix < 0 )
2503
2503
/* diag_listed_as: Label not found for "last %s" */
2504
2504
Perl_croak (aTHX_ "Label not found for \"%s %" SVf "\"" ,
2505
- opname ,
2505
+ OP_NAME ( PL_op ) ,
2506
2506
SVfARG (PL_op -> op_flags & OPf_STACKED
2507
2507
&& !SvGMAGICAL (TOPp1s )
2508
2508
? TOPp1s
@@ -2521,7 +2521,7 @@ PP(pp_last)
2521
2521
PERL_CONTEXT * cx ;
2522
2522
OP * nextop ;
2523
2523
2524
- cx = S_unwind_loop (aTHX_ "last" );
2524
+ cx = S_unwind_loop (aTHX );
2525
2525
2526
2526
assert (CxTYPE_is_LOOP (cx ));
2527
2527
PL_stack_sp = PL_stack_base
@@ -2546,7 +2546,7 @@ PP(pp_next)
2546
2546
{
2547
2547
PERL_CONTEXT * cx ;
2548
2548
2549
- cx = S_unwind_loop (aTHX_ "next" );
2549
+ cx = S_unwind_loop (aTHX );
2550
2550
2551
2551
TOPBLOCK (cx );
2552
2552
PL_curcop = cx -> blk_oldcop ;
@@ -2556,7 +2556,7 @@ PP(pp_next)
2556
2556
2557
2557
PP (pp_redo )
2558
2558
{
2559
- PERL_CONTEXT * cx = S_unwind_loop (aTHX_ "redo" );
2559
+ PERL_CONTEXT * cx = S_unwind_loop (aTHX );
2560
2560
OP * redo_op = cx -> blk_loop .my_op -> op_redoop ;
2561
2561
2562
2562
if (redo_op -> op_type == OP_ENTER ) {
0 commit comments