summaryrefslogtreecommitdiffstats
path: root/Include/context.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/context.h')
-rw-r--r--Include/context.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Include/context.h b/Include/context.h
index 9581285..619746d 100644
--- a/Include/context.h
+++ b/Include/context.h
@@ -17,9 +17,9 @@ PyAPI_DATA(PyTypeObject) PyContextToken_Type;
typedef struct _pycontexttokenobject PyContextToken;
-#define PyContext_CheckExact(o) (Py_TYPE(o) == &PyContext_Type)
-#define PyContextVar_CheckExact(o) (Py_TYPE(o) == &PyContextVar_Type)
-#define PyContextToken_CheckExact(o) (Py_TYPE(o) == &PyContextToken_Type)
+#define PyContext_CheckExact(o) Py_IS_TYPE(o, &PyContext_Type)
+#define PyContextVar_CheckExact(o) Py_IS_TYPE(o, &PyContextVar_Type)
+#define PyContextToken_CheckExact(o) Py_IS_TYPE(o, &PyContextToken_Type)
PyAPI_FUNC(PyObject *) PyContext_New(void);