summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/hexchat-crash-exit.patch
diff options
context:
space:
mode:
authorMarius Bakke <mbakke@fastmail.com>2019-12-05 17:57:35 +0100
committerMarius Bakke <mbakke@fastmail.com>2019-12-05 17:57:35 +0100
commit9d5aa009062a49bd035ae33e37f6562526e7d38c (patch)
tree4ff2302863a5cf9f3cf604240ea793152156f532 /gnu/packages/patches/hexchat-crash-exit.patch
parent60bd56c6d8368c23dcd97b26501771c82316fc8c (diff)
parent2c2fc24b899d3286774f60405888718d98211213 (diff)
downloadguix-patches-9d5aa009062a49bd035ae33e37f6562526e7d38c.tar
guix-patches-9d5aa009062a49bd035ae33e37f6562526e7d38c.tar.gz
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/hexchat-crash-exit.patch')
-rw-r--r--gnu/packages/patches/hexchat-crash-exit.patch31
1 files changed, 31 insertions, 0 deletions
diff --git a/gnu/packages/patches/hexchat-crash-exit.patch b/gnu/packages/patches/hexchat-crash-exit.patch
new file mode 100644
index 0000000000..e67fef73e0
--- /dev/null
+++ b/gnu/packages/patches/hexchat-crash-exit.patch
@@ -0,0 +1,31 @@
+From d9c637ae8a1137d3ca512d2c560589903a4bd79d Mon Sep 17 00:00:00 2001
+From: Adam Williamson <awilliam@redhat.com>
+Date: Tue, 30 Apr 2019 11:16:01 -0700
+Subject: [PATCH] Python plugin: Call EndInterpreter when deinit'ing the plugin
+
+This fixes https://github.com/hexchat/hexchat/issues/2237 , a
+commonly-encountered bug when using Hexchat 2.14 on Python 3.7.
+Thanks to @ncoghlan for the fix.
+
+Signed-off-by: Adam Williamson <awilliam@redhat.com>
+---
+ plugins/python/python.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/plugins/python/python.c b/plugins/python/python.c
+index 4403474d..475756ba 100644
+--- a/plugins/python/python.c
++++ b/plugins/python/python.c
+@@ -2806,6 +2806,9 @@ hexchat_plugin_deinit(void)
+ xchatout_buffer = NULL;
+
+ if (interp_plugin) {
++ PyThreadState *tstate = ((PluginObject*)interp_plugin)->tstate;
++ PyThreadState_Swap(tstate);
++ Py_EndInterpreter(tstate);
+ Py_DECREF(interp_plugin);
+ interp_plugin = NULL;
+ }
+--
+2.21.0
+