aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Include/internal/pycore_instruction_sequence.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/internal/pycore_instruction_sequence.h')
-rw-r--r--Include/internal/pycore_instruction_sequence.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Include/internal/pycore_instruction_sequence.h b/Include/internal/pycore_instruction_sequence.h
index d6a79616db7..099f2fd1240 100644
--- a/Include/internal/pycore_instruction_sequence.h
+++ b/Include/internal/pycore_instruction_sequence.h
@@ -51,6 +51,11 @@ typedef struct {
int id;
} _PyJumpTargetLabel;
+#define NO_LABEL ((const _PyJumpTargetLabel){-1})
+
+#define SAME_JUMP_TARGET_LABEL(L1, L2) ((L1).id == (L2).id)
+#define IS_JUMP_TARGET_LABEL(L) (!SAME_JUMP_TARGET_LABEL((L), (NO_LABEL)))
+
PyAPI_FUNC(PyObject*)_PyInstructionSequence_New(void);
int _PyInstructionSequence_UseLabel(_PyInstructionSequence *seq, int lbl);