From 1bcc32f0620d2e99649a6d423284d9496b7b3548 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 10 Jun 2020 20:08:26 +0200 Subject: bpo-39465: Use _PyInterpreterState_GET() (GH-20788) Replace _PyThreadState_GET() with _PyInterpreterState_GET() in: * get_small_int() * gcmodule.c: add also get_gc_state() function * _PyTrash_deposit_object() * _PyTrash_destroy_chain() * warnings_get_state() * Py_GetRecursionLimit() Cleanup listnode.c: add 'parser' variable. --- Python/ceval.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Python/ceval.c') diff --git a/Python/ceval.c b/Python/ceval.c index d1d0779318..9f2cbb06e6 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -788,8 +788,8 @@ _PyEval_FiniState(struct _ceval_state *ceval) int Py_GetRecursionLimit(void) { - PyThreadState *tstate = _PyThreadState_GET(); - return tstate->interp->ceval.recursion_limit; + PyInterpreterState *interp = _PyInterpreterState_GET(); + return interp->ceval.recursion_limit; } void -- cgit v1.2.1