Skip to content

Commit

Permalink
Use new MAXARG3 macros for readability
Browse files Browse the repository at this point in the history
  • Loading branch information
richardleach committed Dec 5, 2024
1 parent 6b0c0e1 commit 2712d8f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion peep.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions pp.c
Original file line number Diff line number Diff line change
Expand Up @@ -3580,7 +3580,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)
{
Expand All @@ -3600,7 +3600,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) {
Expand Down

0 comments on commit 2712d8f

Please sign in to comment.