diff options
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r-- | Python/pylifecycle.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c index 95fb861..c2ee4ff 100644 --- a/Python/pylifecycle.c +++ b/Python/pylifecycle.c @@ -2123,11 +2123,7 @@ _Py_FatalInitError(_PyInitError err) /* For the atexit module. */ void _Py_PyAtExit(void (*func)(PyObject *), PyObject *module) { - PyThreadState *ts; - PyInterpreterState *is; - - ts = PyThreadState_GET(); - is = ts->interp; + PyInterpreterState *is = _PyInterpreterState_Get(); /* Guard against API misuse (see bpo-17852) */ assert(is->pyexitfunc == NULL || is->pyexitfunc == func); |