Skip to content

Commit 6f2dd74

Browse files
committed
Add OP_TYPE_IS_COP_NN() helper macro
1 parent b0e9f2b commit 6f2dd74

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

op.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1080,6 +1080,9 @@ C<sib> is non-null. For a higher-level interface, see C<L</op_sibling_splice>>.
10801080
#define OP_TYPE_ISNT_AND_WASNT(o, type) \
10811081
( (o) && OP_TYPE_ISNT_AND_WASNT_NN(o, type) )
10821082

1083+
#define OP_TYPE_IS_COP_NN(o) \
1084+
(OP_TYPE_IS_NN(o, OP_NEXTSTATE) || OP_TYPE_IS_NN(o, OP_DBSTATE))
1085+
10831086
/* should match anything that uses ck_ftst in regen/opcodes */
10841087
#define OP_IS_STAT(op) (OP_IS_FILETEST(op) || (op) == OP_LSTAT || (op) == OP_STAT)
10851088

0 commit comments

Comments
 (0)