Commit 6b78bffa authored by Benjamin Peterson's avatar Benjamin Peterson

remove unnecessary clearing of list

parent 18a13933
......@@ -159,7 +159,6 @@ PyArena_New()
void
PyArena_Free(PyArena *arena)
{
int r;
assert(arena);
#if defined(Py_DEBUG)
/*
......@@ -176,12 +175,6 @@ PyArena_Free(PyArena *arena)
assert(arena->a_objects->ob_refcnt == 1);
*/
/* Clear all the elements from the list. This is necessary
to guarantee that they will be DECREFed. */
r = PyList_SetSlice(arena->a_objects,
0, PyList_GET_SIZE(arena->a_objects), NULL);
assert(r == 0);
assert(PyList_GET_SIZE(arena->a_objects) == 0);
Py_DECREF(arena->a_objects);
free(arena);
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment