Commits

Benjamin Peterson  committed 5b77445

remove unnecessary clearing of list

  • Participants
  • Parent commits fcd1364
  • Branches 3.3

Comments (0)

Files changed (1)

File Python/pyarena.c

 void
 PyArena_Free(PyArena *arena)
 {
-    int r;
     assert(arena);
 #if defined(Py_DEBUG)
     /*
     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);
 }