Skip to content

Commit 22cc928

Browse files
refactor: only use SET_SIZE, don't touch buffer metadata
1 parent 5a4d8b8 commit 22cc928

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

Objects/listobject.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3258,9 +3258,7 @@ _PyList_AsTupleAndClear(PyListObject *self)
32583258
Py_BEGIN_CRITICAL_SECTION(self);
32593259
PyObject **items = self->ob_item;
32603260
Py_ssize_t size = Py_SIZE(self);
3261-
self->ob_item = NULL;
32623261
Py_SET_SIZE(self, 0);
3263-
self->allocated = 0;
32643262
ret = _PyTuple_FromArraySteal(items, size);
32653263
free_list_items(items, false);
32663264
Py_END_CRITICAL_SECTION();

0 commit comments

Comments
 (0)