diff options
author | Brandt Bucher <brandtbucher@microsoft.com> | 2023-08-04 23:24:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-08-04 23:24:50 (GMT) |
commit | 05a824f294f1409f33e32f1799d5b413dcf24445 (patch) | |
tree | 173417047763313af6cc1a3c4c54f1d510d28d62 /Modules/_asynciomodule.c | |
parent | ec0a0d2bd9faa247d5b3208a8138e4399b2da890 (diff) | |
download | cpython-05a824f294f1409f33e32f1799d5b413dcf24445.zip cpython-05a824f294f1409f33e32f1799d5b413dcf24445.tar.gz cpython-05a824f294f1409f33e32f1799d5b413dcf24445.tar.bz2 |
GH-84436: Skip refcounting for known immortals (GH-107605)
Diffstat (limited to 'Modules/_asynciomodule.c')
-rw-r--r-- | Modules/_asynciomodule.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_asynciomodule.c b/Modules/_asynciomodule.c index f5a589b..39c8033 100644 --- a/Modules/_asynciomodule.c +++ b/Modules/_asynciomodule.c @@ -1398,7 +1398,8 @@ FutureObj_get_state(FutureObj *fut, void *Py_UNUSED(ignored)) default: assert (0); } - return Py_XNewRef(ret); + assert(_Py_IsImmortal(ret)); + return ret; } static PyObject * |