diff options
| author | Raymond Hettinger <rhettinger@users.noreply.github.com> | 2022-12-09 17:02:35 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-09 17:02:35 (GMT) |
| commit | 8c215466dbcdfbdedf0faba7c8ae64461069042b (patch) | |
| tree | 92a365d762c993543f173698d7b85b177328365f /Modules/itertoolsmodule.c | |
| parent | d0679c12398579fe9f10e78b6332dded119e4697 (diff) | |
| download | cpython-8c215466dbcdfbdedf0faba7c8ae64461069042b.zip cpython-8c215466dbcdfbdedf0faba7c8ae64461069042b.tar.gz cpython-8c215466dbcdfbdedf0faba7c8ae64461069042b.tar.bz2 | |
GH-98363: Shrink the physical size as well as the logical size (GH-100138)
Diffstat (limited to 'Modules/itertoolsmodule.c')
| -rw-r--r-- | Modules/itertoolsmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/itertoolsmodule.c b/Modules/itertoolsmodule.c index 60ec11c..c1f1e73 100644 --- a/Modules/itertoolsmodule.c +++ b/Modules/itertoolsmodule.c @@ -182,8 +182,7 @@ batched_next(batchedobject *bo) Py_DECREF(result); return NULL; } - /* Elements in result[i:] are still NULL */ - Py_SET_SIZE(result, i); + _PyTuple_Resize(&result, i); return result; } |
