summaryrefslogtreecommitdiff
path: root/_dbus_bindings/bytes.c
diff options
context:
space:
mode:
Diffstat (limited to '_dbus_bindings/bytes.c')
-rw-r--r--_dbus_bindings/bytes.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/_dbus_bindings/bytes.c b/_dbus_bindings/bytes.c
index e053f43..9914319 100644
--- a/_dbus_bindings/bytes.c
+++ b/_dbus_bindings/bytes.c
@@ -92,7 +92,7 @@ Byte_new(PyTypeObject *cls, PyObject *args, PyObject *kwargs)
if (PyBytes_GET_SIZE(obj) != 1) {
goto bad_arg;
}
- obj = PyLong_FromLong((unsigned char)(PyBytes_AS_STRING(obj)[0]));
+ obj = NATIVEINT_FROMLONG((unsigned char)(PyBytes_AS_STRING(obj)[0]));
if (!obj)
goto bad_arg;
}
@@ -147,7 +147,7 @@ bad_range:
static PyObject *
Byte_tp_str(PyObject *self)
{
- long i = PyLong_AsLong(self);
+ long i = NATIVEINT_ASLONG(self);
unsigned char str[2] = { 0, 0 };
if (i == -1 && PyErr_Occurred())