GH-98363: Shrink the physical size as well as the logical size · python/cpython@82c4d55

GitHub

Original file line numberDiff line numberDiff line change@@ -182,8 +182,7 @@ batched_next(batchedobject *bo)

182182Py_DECREF(result);

183183returnNULL;

184184 }

185-/* Elements in result[i:] are still NULL */

186-Py_SET_SIZE(result, i);

185+_PyTuple_Resize(&result, i);

187186returnresult;

188187}

189188