Skip to content

Commit d9d8747

Browse files
committed
Resolve more comments on 154019
1 parent 46a6c11 commit d9d8747

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

Objects/listobject.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -253,8 +253,8 @@ PyList_New(Py_ssize_t size)
253253
}
254254
}
255255
op->ob_item = NULL;
256+
op->allocated = 0;
256257
Py_SET_SIZE(op, size);
257-
op->allocated = size;
258258

259259
if (size > 0) {
260260
#ifdef Py_GIL_DISABLED
@@ -273,6 +273,8 @@ PyList_New(Py_ssize_t size)
273273
return PyErr_NoMemory();
274274
}
275275
}
276+
277+
op->allocated = size;
276278
_PyObject_GC_TRACK(op);
277279
return (PyObject *) op;
278280
}

0 commit comments

Comments
 (0)