summaryrefslogtreecommitdiffstats
path: root/Objects/longobject.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-06-10 18:08:26 (GMT)
committerGitHub <noreply@github.com>2020-06-10 18:08:26 (GMT)
commit1bcc32f0620d2e99649a6d423284d9496b7b3548 (patch)
treef42552bb9acbb5d9fd90b47f95a63487ab438262 /Objects/longobject.c
parent9c24e2e4c10705d95258558348417a28007dac66 (diff)
downloadcpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.zip
cpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.tar.gz
cpython-1bcc32f0620d2e99649a6d423284d9496b7b3548.tar.bz2
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 'Objects/longobject.c')
-rw-r--r--Objects/longobject.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c
index ce10c4f..dead3e3 100644
--- a/Objects/longobject.c
+++ b/Objects/longobject.c
@@ -41,8 +41,8 @@ static PyObject *
get_small_int(sdigit ival)
{
assert(IS_SMALL_INT(ival));
- PyThreadState *tstate = _PyThreadState_GET();
- PyObject *v = (PyObject*)tstate->interp->small_ints[ival + NSMALLNEGINTS];
+ PyInterpreterState *interp = _PyInterpreterState_GET();
+ PyObject *v = (PyObject*)interp->small_ints[ival + NSMALLNEGINTS];
Py_INCREF(v);
return v;
}