summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-11-11 12:29:39 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-11-11 12:29:39 (GMT)
commite2c37b97027ce02ab6fdfb14efc6c43d21c2ebe7 (patch)
tree5c05d275735bb144cac9681b1fb742237aa0d149
parent4140c074a40ec1e1a68b6c2cb040b8746a7c0e34 (diff)
Removed calls to deprecated Python functions.
-rw-r--r--plugins/pychrysalide/pychrysa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/plugins/pychrysalide/pychrysa.c b/plugins/pychrysalide/pychrysa.c
index f998b67..9f0bc20 100644
--- a/plugins/pychrysalide/pychrysa.c
+++ b/plugins/pychrysalide/pychrysa.c
@@ -833,13 +833,18 @@ G_MODULE_EXPORT void chrysalide_plugin_exit(GPluginModule *plugin)
G_MODULE_EXPORT void chrysalide_plugin_on_native_loaded(GPluginModule *plugin, PluginAction action)
{
+ PyThreadState *tstate; /* Contexte d'environnement */
+
if (!_standalone)
- PyEval_AcquireLock();
+ {
+ tstate = get_pychrysalide_main_tstate();
+ PyEval_RestoreThread(tstate);
+ }
load_python_plugins(plugin);
if (!_standalone)
- PyEval_ReleaseLock();
+ PyEval_SaveThread();
}