Skip to content

Commit

Permalink
Add OP_TYPE_IS_COP() helper macro
Browse files Browse the repository at this point in the history
  • Loading branch information
leonerd committed Nov 18, 2024
1 parent b0e9f2b commit 04de8ee
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions op.h
Original file line number Diff line number Diff line change
Expand Up @@ -1080,6 +1080,9 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
#define OP_TYPE_ISNT_AND_WASNT(o, type) \
( (o) && OP_TYPE_ISNT_AND_WASNT_NN(o, type) )

#define OP_TYPE_IS_COP(o) \
(OP_TYPE_IS(o, OP_NEXTSTATE) || OP_TYPE_IS(o, OP_DBSTATE))

/* should match anything that uses ck_ftst in regen/opcodes */
#define OP_IS_STAT(op) (OP_IS_FILETEST(op) || (op) == OP_LSTAT || (op) == OP_STAT)

Expand Down

0 comments on commit 04de8ee

Please sign in to comment.