diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/pystate.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 14ae2748b0b..4757a8c3d14 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -1393,10 +1393,8 @@ interp_look_up_id(_PyRuntimeState *runtime, int64_t requested_id) { PyInterpreterState *interp = runtime->interpreters.head; while (interp != NULL) { - int64_t id = PyInterpreterState_GetID(interp); - if (id < 0) { - return NULL; - } + int64_t id = interp->id; + assert(id >= 0); if (requested_id == id) { return interp; } |