gh-145681: do not deallocate list buffer in `_PyList_AsTupleAndClear` (GH-145680)
Setting the size to 0 turns the list contents into overallocated memory that the deallocator will free. Ownership is transferred to the new tuple so no refcount adjustment is needed.
T
Thomas Kowalski committed
7836ecc5daf541061de2072070f7371d41b009ee
Parent: 453562a
Committed by GitHub <noreply@github.com>
on 3/12/2026, 1:27:07 PM