guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: hexchat: Fix crash on exit.


From: guix-commits
Subject: 01/01: gnu: hexchat: Fix crash on exit.
Date: Thu, 21 Nov 2019 16:28:29 -0500 (EST)

roptat pushed a commit to branch master
in repository guix.

commit 8da527d5bc1a1c6c5718236d1870fe907f80dfc6
Author: Julien Lepiller <address@hidden>
Date:   Thu Nov 21 22:24:07 2019 +0100

    gnu: hexchat: Fix crash on exit.
    
    * gnu/packages/patches/hexchat-crash-exit.patch: New file.
    * gnu/packages/hexchat.scm (orgin): Add patch.
    * gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                  |  1 +
 gnu/packages/messaging.scm                    |  3 ++-
 gnu/packages/patches/hexchat-crash-exit.patch | 31 +++++++++++++++++++++++++++
 3 files changed, 34 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 4d14c4c..7672295 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -978,6 +978,7 @@ dist_patch_DATA =                                           
\
   %D%/packages/patches/hdf-eos5-remove-gctp.patch              \
   %D%/packages/patches/hdf-eos5-fix-szip.patch                 \
   %D%/packages/patches/hdf-eos5-fortrantests.patch             \
+  %D%/packages/patches/hexchat-crash-exit.patch                        \
   %D%/packages/patches/higan-remove-march-native-flag.patch    \
   %D%/packages/patches/hubbub-sort-entities.patch              \
   %D%/packages/patches/hurd-fix-eth-multiplexer-dependency.patch        \
diff --git a/gnu/packages/messaging.scm b/gnu/packages/messaging.scm
index 3f223c2..694dfbb 100644
--- a/gnu/packages/messaging.scm
+++ b/gnu/packages/messaging.scm
@@ -263,7 +263,8 @@ access to servers running the Discord protocol.")
                                   version ".tar.xz"))
               (sha256
                (base32
-                "064nq151nzsljv97dmkifyl162d2738vbgvm1phx7yv04pjvk4kp"))))
+                "064nq151nzsljv97dmkifyl162d2738vbgvm1phx7yv04pjvk4kp"))
+              (patches (search-patches "hexchat-crash-exit.patch"))))
     (build-system meson-build-system)
     (native-inputs `(("gettext" ,gettext-minimal)
                      ("perl" ,perl)
diff --git a/gnu/packages/patches/hexchat-crash-exit.patch 
b/gnu/packages/patches/hexchat-crash-exit.patch
new file mode 100644
index 0000000..e67fef7
--- /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 <address@hidden>
+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 <address@hidden>
+---
+ 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
+



reply via email to

[Prev in Thread] Current Thread [Next in Thread]