From 3c55fa6ea63418916ee856f2d78447776d8a3a09 Mon Sep 17 00:00:00 2001 From: Richard Leach Date: Thu, 5 Dec 2024 15:19:41 +0000 Subject: [PATCH] Use new MAXARG3 macros for readability --- peep.c | 2 +- pp.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/peep.c b/peep.c index ea2f7f18eeed..ad71559ec7a4 100644 --- a/peep.c +++ b/peep.c @@ -3988,7 +3988,7 @@ Perl_rpeep(pTHX_ OP *o) */ OP *left = OpSIBLING(right); if (left->op_type == OP_SUBSTR - && (left->op_private & 7) < 4) { + && (cMAXARG3x(left) < 4)) { op_null(o); /* cut out right */ op_sibling_splice(o, NULL, 1, NULL); diff --git a/pp.c b/pp.c index 9777bfe5340d..647f76dc4a13 100644 --- a/pp.c +++ b/pp.c @@ -3575,7 +3575,7 @@ Perl_translate_substr_offsets( STRLEN curlen, IV pos1_iv, } PP_wrapped(pp_substr, - (PL_op->op_private & 7) + MAXARG3 + ((PL_op->op_private & OPpSUBSTR_REPL_FIRST) ? 1 : 0), 0) { @@ -3595,7 +3595,7 @@ PP_wrapped(pp_substr, SV *repl_sv = NULL; const char *repl = NULL; STRLEN repl_len; - int num_args = PL_op->op_private & 7; + int num_args = MAXARG3; bool repl_need_utf8_upgrade = FALSE; if (num_args > 2) {