Skip to content

Commit

Permalink
Add MAXARG3 for neater checking of small argument counts
Browse files Browse the repository at this point in the history
Variants are named to match the style of macros in op.h
  • Loading branch information
richardleach committed Dec 5, 2024
1 parent 342b57d commit 34acaee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion peep.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@


#define CALL_RPEEP(o) PL_rpeepp(aTHX_ o)

#define cMAXARG3x(o) (o->op_private & OPpARG3_MASK)

static void
S_scalar_slice_warning(pTHX_ const OP *o)
Expand Down
2 changes: 2 additions & 0 deletions pp.h
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,8 @@ Does not use C<TARG>. See also C<L</XPUSHu>>, C<L</mPUSHu>> and C<L</PUSHu>>.
#define ARGTARG PL_op->op_targ

#define MAXARG (PL_op->op_private & OPpARG4_MASK)
#define MAXARG3 (PL_op->op_private & OPpARG3_MASK)


/* for backcompat - use switch_argstack() instead */

Expand Down

0 comments on commit 34acaee

Please sign in to comment.