Skip to content

Commit 82c4d55

Browse files
committed
GH-98363: Shrink the physical size as well as the logical size
1 parent a29a7b9 commit 82c4d55

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Modules/itertoolsmodule.c

+1-2
Original file line numberDiff line numberDiff line change
@@ -182,8 +182,7 @@ batched_next(batchedobject *bo)
182182
Py_DECREF(result);
183183
return NULL;
184184
}
185-
/* Elements in result[i:] are still NULL */
186-
Py_SET_SIZE(result, i);
185+
_PyTuple_Resize(&result, i);
187186
return result;
188187
}
189188

0 commit comments

Comments
 (0)