From 5b97a1892998125384b24979c2148ea54b211171 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 68da56f3bf13..e9de45eb0a68 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 cd4550c0d768..43513c3a7a53 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) {