summaryrefslogtreecommitdiffstats
path: root/Modules/_xxsubinterpretersmodule.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-04-28 16:20:40 (GMT)
committerGitHub <noreply@github.com>2021-04-28 16:20:40 (GMT)
commit0252ce35712f4a12e824fb8b40a867ec3460443e (patch)
treec6e3107bbce808649d38ca345edf49d4a056cf89 /Modules/_xxsubinterpretersmodule.c
parent629ef0fb9cad6ac340d3be884af7b47fb393ae99 (diff)
downloadcpython-0252ce35712f4a12e824fb8b40a867ec3460443e.zip
cpython-0252ce35712f4a12e824fb8b40a867ec3460443e.tar.gz
cpython-0252ce35712f4a12e824fb8b40a867ec3460443e.tar.bz2
bpo-43472: Ensure PyInterpreterState_New audit events are raised when called through _xxsubinterpreters module (GH-25506) (GH-25508)
(cherry picked from commit 7b86e47617d81a4b14d929743425f448971e8c86) Co-authored-by: Steve Dower <steve.dower@python.org> Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Modules/_xxsubinterpretersmodule.c')
-rw-r--r--Modules/_xxsubinterpretersmodule.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Modules/_xxsubinterpretersmodule.c b/Modules/_xxsubinterpretersmodule.c
index de11c09..314059d 100644
--- a/Modules/_xxsubinterpretersmodule.c
+++ b/Modules/_xxsubinterpretersmodule.c
@@ -2010,7 +2010,7 @@ interp_create(PyObject *self, PyObject *args, PyObject *kwds)
}
// Create and initialize the new interpreter.
- PyThreadState *save_tstate = PyThreadState_Swap(NULL);
+ PyThreadState *save_tstate = PyThreadState_Get();
// XXX Possible GILState issues?
PyThreadState *tstate = _Py_NewInterpreter(isolated);
PyThreadState_Swap(save_tstate);