summaryrefslogtreecommitdiff
path: root/_dbus_bindings/bytes.c
diff options
context:
space:
mode:
authorSimon McVittie <simon.mcvittie@collabora.co.uk>2011-12-13 11:38:48 +0000
committerSimon McVittie <simon.mcvittie@collabora.co.uk>2011-12-13 11:38:48 +0000
commitebd44a420264da0031b715f7f08a0b347a81dd30 (patch)
tree0057af95b776a326ccbb34d5e5864be1138097b8 /_dbus_bindings/bytes.c
parentdc1c98f05d29c5b7464d7ac34ee900066f261a86 (diff)
downloaddbus-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.c2
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;