the size_t nbytes, and passed nbytes to malloc, so it was confusing to
effectively recompute the same thing from scratch in the memset call.
{
PyListObject *op;
size_t nbytes;
+
if (size < 0) {
PyErr_BadInternalCall();
return NULL;
op->ob_item = (PyObject **) PyMem_MALLOC(nbytes);
if (op->ob_item == NULL)
return PyErr_NoMemory();
- memset(op->ob_item, 0, sizeof(*op->ob_item) * size);
+ memset(op->ob_item, 0, nbytes);
}
op->ob_size = size;
op->allocated = size;