diff options
author | Sergey Poznyakoff <gray@gnu.org> | 2019-02-24 22:56:21 +0200 |
---|---|---|
committer | Sergey Poznyakoff <gray@gnu.org> | 2019-02-24 22:56:21 +0200 |
commit | 4e66a6a9e5f5696d60f7df875175f2e0ad8f7376 (patch) | |
tree | eb29dd562157bfd757db7eaca40b56373c8331a0 | |
parent | d537d33af707b924faf6085c3003e2a99e021004 (diff) | |
download | mailutils-4e66a6a9e5f5696d60f7df875175f2e0ad8f7376.tar.gz mailutils-4e66a6a9e5f5696d60f7df875175f2e0ad8f7376.tar.bz2 |
Bugfix
* python/3/libmu_py/mailcap.c: Fix leftover uses of PyString_FromString
and PyInt_FromLong.
-rw-r--r-- | python/3/libmu_py/mailcap.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/python/3/libmu_py/mailcap.c b/python/3/libmu_py/mailcap.c index 6db177052..fdb5b71c7 100644 --- a/python/3/libmu_py/mailcap.c +++ b/python/3/libmu_py/mailcap.c @@ -91,11 +91,11 @@ api_mailcap_create (PyObject *self, PyObject *args) status = mu_mailcap_create (&py_mc->mc); if (status) - return _ro (PyInt_FromLong (status)); + return _ro (PyLong_FromLong (status)); status = mu_mailcap_parse (py_mc->mc, py_stm->stm, NULL); if (status == MU_ERR_PARSE) status = 0; /* FIXME */ - return _ro (PyInt_FromLong (status)); + return _ro (PyLong_FromLong (status)); } static PyObject * @@ -183,7 +183,7 @@ api_mailcap_entry_get_field (PyObject *self, PyObject *args) status = mu_mailcap_entry_sget_field (py_entry->entry, name, &value); return status_object (status, status == 0 - ? (value ? PyString_FromString (value) + ? (value ? PyUnicode_FromString (value) : PyBool_FromLong (1)) : PyBool_FromLong (0)); } @@ -199,7 +199,7 @@ api_mailcap_entry_get_typefield (PyObject *self, PyObject *args) return NULL; status = mu_mailcap_entry_sget_type (py_entry->entry, &value); - return status_object (status, PyString_FromString (status == 0 ? value : "")); + return status_object (status, PyUnicode_FromString (status == 0 ? value : "")); } static PyObject * @@ -213,7 +213,7 @@ api_mailcap_entry_get_viewcommand (PyObject *self, PyObject *args) return NULL; status = mu_mailcap_entry_sget_command (py_entry->entry, &value); - return status_object (status, PyString_FromString (status == 0 ? value : "")); + return status_object (status, PyUnicode_FromString (status == 0 ? value : "")); } static PyMethodDef methods[] = { |