summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2020-06-19 22:08:56 +0200
committerConrad Kostecki <conikost@gentoo.org>2020-06-19 23:21:26 +0200
commitb9c4d4e20557d71538b11aa7dea1e6128fd066a0 (patch)
tree274c79c626cb09a1f7a2770506cc1184cbcfd746 /app-misc/lcd4linux/files
parentsys-auth/AusweisApp2: New package (diff)
downloadgentoo-b9c4d4e20557d71538b11aa7dea1e6128fd066a0.tar.gz
gentoo-b9c4d4e20557d71538b11aa7dea1e6128fd066a0.tar.bz2
gentoo-b9c4d4e20557d71538b11aa7dea1e6128fd066a0.zip
app-misc/lcd4linux: update python plugin to python3
Package-Manager: Portage-2.3.101, Repoman-2.3.22 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'app-misc/lcd4linux/files')
-rw-r--r--app-misc/lcd4linux/files/lcd4linux-0.11.0_pre20170527-python3.patch41
1 files changed, 41 insertions, 0 deletions
diff --git a/app-misc/lcd4linux/files/lcd4linux-0.11.0_pre20170527-python3.patch b/app-misc/lcd4linux/files/lcd4linux-0.11.0_pre20170527-python3.patch
new file mode 100644
index 000000000000..f39a72e56528
--- /dev/null
+++ b/app-misc/lcd4linux/files/lcd4linux-0.11.0_pre20170527-python3.patch
@@ -0,0 +1,41 @@
+Update python plugin for python3
+
+Since the python plugin compiles against python2,
+it must be updated, in order to use with python3.
+
+Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
+---
+ plugin_python.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/plugin_python.c b/plugin_python.c
+index fcd3419..4468a46 100644
+--- a/plugin_python.c
++++ b/plugin_python.c
+@@ -55,7 +55,7 @@ static void pyt_exec_str(RESULT * result, const char *module, const char *functi
+ const char *rv = NULL;
+ int i;
+
+- pName = PyString_FromString(module);
++ pName = PyUnicode_FromString(module);
+ /* Error checking of pName left out */
+
+ pModule = PyImport_Import(pName);
+@@ -71,7 +71,7 @@ static void pyt_exec_str(RESULT * result, const char *module, const char *functi
+ if (pFunc && PyCallable_Check(pFunc)) {
+ pArgs = PyTuple_New(argc);
+ for (i = 0; i < argc; ++i) {
+- pValue = PyString_FromString(argv[i]);
++ pValue = PyUnicode_FromString(argv[i]);
+ if (!pValue) {
+ Py_DECREF(pArgs);
+ Py_DECREF(pModule);
+@@ -85,7 +85,7 @@ static void pyt_exec_str(RESULT * result, const char *module, const char *functi
+ pValue = PyObject_CallObject(pFunc, pArgs);
+ Py_DECREF(pArgs);
+ if (pValue != NULL) {
+- rv = PyString_AsString(pValue);
++ rv = PyUnicode_AsUTF8(pValue);
+ SetResult(&result, R_STRING, rv);
+ Py_DECREF(pValue);
+ /* rv is now a 'dangling reference' */