summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-mail/mailutils/files/mailutils-3.6-python3.patch')
-rw-r--r--net-mail/mailutils/files/mailutils-3.6-python3.patch59
1 files changed, 59 insertions, 0 deletions
diff --git a/net-mail/mailutils/files/mailutils-3.6-python3.patch b/net-mail/mailutils/files/mailutils-3.6-python3.patch
new file mode 100644
index 000000000000..cad46d006a2a
--- /dev/null
+++ b/net-mail/mailutils/files/mailutils-3.6-python3.patch
@@ -0,0 +1,59 @@
+From 4e66a6a9e5f5696d60f7df875175f2e0ad8f7376 Mon Sep 17 00:00:00 2001
+From: Sergey Poznyakoff <gray@gnu.org>
+Date: Sun, 24 Feb 2019 22:56:21 +0200
+Subject: Bugfix
+
+* python/3/libmu_py/mailcap.c: Fix leftover uses of PyString_FromString
+and PyInt_FromLong.
+---
+ python/3/libmu_py/mailcap.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/python/3/libmu_py/mailcap.c b/python/3/libmu_py/mailcap.c
+index 6db1770..fdb5b71 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[] = {
+--
+cgit v1.0-41-gc330
+