Files
guru/sci-electronics/dsview/files/dsview-1.12-fix-segfault.patch
Huang Rui b26e5a664b sci-electronics/dsview: fix gcc-11 compile
* fix extern-c error when compile
* fix qt compile error
* fix segfault
* remove useless patches

Closes: https://bugs.gentoo.org/787674
Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Huang Rui <vowstar@gmail.com>
2021-05-09 03:40:22 +08:00

23 lines
801 B
Diff

diff --git a/libsigrokdecode4DSL/instance.c b/libsigrokdecode4DSL/instance.c
index 5ede710..5d96701 100755
--- a/libsigrokdecode4DSL/instance.c
+++ b/libsigrokdecode4DSL/instance.c
@@ -370,6 +370,8 @@ SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
}
}
+ gstate = PyGILState_Ensure();
+
/*
* Prepare a default channel map, where samples come in the
* order in which the decoder class defined them.
@@ -389,8 +391,6 @@ SRD_API struct srd_decoder_inst *srd_inst_new(struct srd_session *sess,
/* Default to the initial pins being the same as in sample 0. */
oldpins_array_seed(di);
- gstate = PyGILState_Ensure();
-
/* Create a new instance of this decoder class. */
if (!(di->py_inst = PyObject_CallObject(dec->py_dec, NULL))) {
if (PyErr_Occurred())