1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
|