diff options
author | Victor Stinner <vstinner@python.org> | 2020-06-10 20:08:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-10 20:08:26 +0200 |
commit | 1bcc32f0620d2e99649a6d423284d9496b7b3548 (patch) | |
tree | f42552bb9acbb5d9fd90b47f95a63487ab438262 /Python/ceval.c | |
parent | bpo-40927: Fix test_binhex when run twice (GH-20764) (diff) | |
download | cpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.tar.gz cpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.tar.bz2 cpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.zip |
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.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 |