summaryrefslogtreecommitdiff
path: root/Include/boolobject.h
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 +0000
committerMartin v. Löwis <martin@v.loewis.de>2007-07-21 06:55:02 +0000
commit778038e965a1ff5bcc5585431cb193bd89eb9005 (patch)
treea25dda76813c1223f6a2d246f3fa63c9ff66dd4b /Include/boolobject.h
parent5a122db52c24ed01ad2fba7efeed10048cbcc9fe (diff)
downloadcpython-778038e965a1ff5bcc5585431cb193bd89eb9005.tar.gz
PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
Diffstat (limited to 'Include/boolobject.h')
-rw-r--r--Include/boolobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/boolobject.h b/Include/boolobject.h
index 7f9ad01a05..6499345cec 100644
--- a/Include/boolobject.h
+++ b/Include/boolobject.h
@@ -11,7 +11,7 @@ typedef PyIntObject PyBoolObject;
PyAPI_DATA(PyTypeObject) PyBool_Type;
-#define PyBool_Check(x) ((x)->ob_type == &PyBool_Type)
+#define PyBool_Check(x) (Py_Type(x) == &PyBool_Type)
/* Py_False and Py_True are the only two bools in existence.
Don't forget to apply Py_INCREF() when returning either!!! */