diff options
author | Simon McVittie <smcv@collabora.com> | 2021-09-14 16:48:18 +0100 |
---|---|---|
committer | Simon McVittie <smcv@collabora.com> | 2021-09-15 18:49:14 +0100 |
commit | 98cbe2b3ace53ef70738345548402cb4e74a4db7 (patch) | |
tree | 8214142a629fc4d45b0fc647860b7ae4bd6b9776 /dbus_bindings/message.c | |
parent | abd5b946bb2ca9b6c4d2f5e455aaaae5f38946c6 (diff) |
Remove support for Python 2
Python 2 reached EOL on 2020-01-01, and the latest version of
AX_PYTHON_DEVEL breaks the build with Python 2. This seems as good a
time as any to drop compatibility.
Signed-off-by: Simon McVittie <smcv@collabora.com>
Diffstat (limited to 'dbus_bindings/message.c')
-rw-r--r-- | dbus_bindings/message.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/dbus_bindings/message.c b/dbus_bindings/message.c index 7c0c192..4ebd59b 100644 --- a/dbus_bindings/message.c +++ b/dbus_bindings/message.c @@ -392,7 +392,7 @@ static PyObject * Message_get_type(Message *self, PyObject *unused UNUSED) { if (!self->msg) return DBusPy_RaiseUnusableMessage(); - return NATIVEINT_FROMLONG(dbus_message_get_type(self->msg)); + return PyLong_FromLong(dbus_message_get_type(self->msg)); } PyDoc_STRVAR(Message_get_serial__doc__, @@ -466,7 +466,7 @@ Message_get_member(Message *self, PyObject *unused UNUSED) if (!c_str) { Py_RETURN_NONE; } - return NATIVESTR_FROMSTR(c_str); + return PyUnicode_FromString(c_str); } PyDoc_STRVAR(Message_has_member__doc__, @@ -541,7 +541,7 @@ Message_get_path_decomposed(Message *self, PyObject *unused UNUSED) Py_RETURN_NONE; } for (ptr = paths; *ptr; ptr++) { - PyObject *str = NATIVESTR_FROMSTR(*ptr); + PyObject *str = PyUnicode_FromString(*ptr); if (!str) { Py_CLEAR(ret); @@ -627,7 +627,7 @@ Message_get_sender(Message *self, PyObject *unused UNUSED) if (!c_str) { Py_RETURN_NONE; } - return NATIVESTR_FROMSTR(c_str); + return PyUnicode_FromString(c_str); } PyDoc_STRVAR(Message_has_sender__doc__, @@ -673,7 +673,7 @@ Message_get_destination(Message *self, PyObject *unused UNUSED) if (!c_str) { Py_RETURN_NONE; } - return NATIVESTR_FROMSTR(c_str); + return PyUnicode_FromString(c_str); } PyDoc_STRVAR(Message_has_destination__doc__, @@ -718,7 +718,7 @@ Message_get_interface(Message *self, PyObject *unused UNUSED) if (!c_str) { Py_RETURN_NONE; } - return NATIVESTR_FROMSTR(c_str); + return PyUnicode_FromString(c_str); } PyDoc_STRVAR(Message_has_interface__doc__, @@ -763,7 +763,7 @@ Message_get_error_name(Message *self, PyObject *unused UNUSED) if (!c_str) { Py_RETURN_NONE; } - return NATIVESTR_FROMSTR(c_str); + return PyUnicode_FromString(c_str); } PyDoc_STRVAR(Message_set_error_name__doc__, |