diff options
| author | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 06:55:02 +0000 |
|---|---|---|
| committer | Martin v. Löwis <martin@v.loewis.de> | 2007-07-21 06:55:02 +0000 |
| commit | 778038e965a1ff5bcc5585431cb193bd89eb9005 (patch) | |
| tree | a25dda76813c1223f6a2d246f3fa63c9ff66dd4b /Include/unicodeobject.h | |
| parent | 5a122db52c24ed01ad2fba7efeed10048cbcc9fe (diff) | |
| download | cpython-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/unicodeobject.h')
| -rw-r--r-- | Include/unicodeobject.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/unicodeobject.h b/Include/unicodeobject.h index 0bad8c32a2..5d9263b459 100644 --- a/Include/unicodeobject.h +++ b/Include/unicodeobject.h @@ -393,8 +393,8 @@ typedef struct { PyAPI_DATA(PyTypeObject) PyUnicode_Type; #define PyUnicode_Check(op) \ - PyType_FastSubclass((op)->ob_type, Py_TPFLAGS_UNICODE_SUBCLASS) -#define PyUnicode_CheckExact(op) ((op)->ob_type == &PyUnicode_Type) + PyType_FastSubclass(Py_Type(op), Py_TPFLAGS_UNICODE_SUBCLASS) +#define PyUnicode_CheckExact(op) (Py_Type(op) == &PyUnicode_Type) /* Fast access macros */ #define PyUnicode_GET_SIZE(op) \ |
