From ba74dabc9ceefb3fe4e00ecf5deccdb5e1297bd4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ole=20Andr=C3=A9=20Vadla=20Ravn=C3=A5s?= Date: Thu, 3 Dec 2020 00:13:16 +0100 Subject: [PATCH] Skip PyEval_InitThreads() on newer versions of Python It has no effect starting with 3.7, and is deprecated as of 3.9. --- src/_frida.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/_frida.c b/src/_frida.c index 22781ac..4f8afe6 100644 --- a/src/_frida.c +++ b/src/_frida.c @@ -3969,7 +3969,9 @@ MOD_INIT (_frida) { PyObject * inspect, * module; +#if PY_VERSION_HEX < 0x03070000 PyEval_InitThreads (); +#endif inspect = PyImport_ImportModule ("inspect"); inspect_getargspec = PyObject_GetAttrString (inspect, PYFRIDA_GETARGSPEC_FUNCTION);