diff options
author | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-12-13 11:38:48 +0000 |
---|---|---|
committer | Simon McVittie <simon.mcvittie@collabora.co.uk> | 2011-12-13 11:38:48 +0000 |
commit | ebd44a420264da0031b715f7f08a0b347a81dd30 (patch) | |
tree | 0057af95b776a326ccbb34d5e5864be1138097b8 /_dbus_bindings/bytes.c | |
parent | dc1c98f05d29c5b7464d7ac34ee900066f261a86 (diff) | |
download | dbus-python-ebd44a420264da0031b715f7f08a0b347a81dd30.tar.gz |
Use Py_TYPE() rather than thing->ob_type, for Python 3 portability
Based on part of a patch from Barry Warsaw.
Signed-off-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
Diffstat (limited to '_dbus_bindings/bytes.c')
-rw-r--r-- | _dbus_bindings/bytes.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/_dbus_bindings/bytes.c b/_dbus_bindings/bytes.c index 5c76ec2..06d3d47 100644 --- a/_dbus_bindings/bytes.c +++ b/_dbus_bindings/bytes.c @@ -89,7 +89,7 @@ Byte_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs) else if (PyInt_Check(obj)) { long i = PyInt_AS_LONG(obj); - if (obj->ob_type == cls && + if (Py_TYPE(obj) == cls && ((DBusPyIntBase *)obj)->variant_level == variantness) { Py_INCREF(obj); return obj; |