From 04de8eed26caad9a641f4917408268ac19458df7 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Mon, 18 Nov 2024 22:04:52 +0000 Subject: [PATCH] Add OP_TYPE_IS_COP() helper macro --- op.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/op.h b/op.h index 3f04815deaaf9..4af70acc719d9 100644 --- a/op.h +++ b/op.h @@ -1080,6 +1080,9 @@ C is non-null. For a higher-level interface, see C>. #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)