summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Ostrovsky <david@ostrovsky.org>2020-12-21 07:56:11 +0100
committerAdolfo Jayme Barrientos <fitojb@ubuntu.com>2021-01-05 22:18:52 +0100
commitd29de0b38ef6854bb129e82fd280f33b0d5b9a08 (patch)
tree7d237d672875f0ff2e6a48891c9d0af741ed1ea4
parent9ffc483be4ca49c436406a93690044459e880a9d (diff)
tdf#138987 pyuno: PyEval_InitThreads is a no-op in Python 3.9
Change-Id: I220eecfa6aaf4d5cb12e3b4eacadf25843b41452 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108403 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de> (cherry picked from commit 8be493744cafc2572c701e681ab147fa28c6bc39) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/108718 Reviewed-by: David Ostrovsky <david@ostrovsky.org> Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
-rw-r--r--pyuno/source/loader/pyuno_loader.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/pyuno/source/loader/pyuno_loader.cxx b/pyuno/source/loader/pyuno_loader.cxx
index a8722dd835bb..873a3c3bbe71 100644
--- a/pyuno/source/loader/pyuno_loader.cxx
+++ b/pyuno/source/loader/pyuno_loader.cxx
@@ -216,7 +216,9 @@ void pythonInit() {
// initialize python
Py_Initialize();
+#if PY_VERSION_HEX < 0x03090000
PyEval_InitThreads();
+#endif
PyThreadState *tstate = PyThreadState_Get();
PyEval_ReleaseThread( tstate );