From: Benjamin Peterson Date: Sat, 19 Jan 2013 19:58:38 +0000 (-0500) Subject: remove unnecessary clearing of list X-Git-Tag: v2.7.4rc1~226 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6b78bffa2089922bf26d6e345550f1af7d8ab1c1;p=thirdparty%2FPython%2Fcpython.git remove unnecessary clearing of list --- diff --git a/Python/pyarena.c b/Python/pyarena.c index 2d63638856c4..513b3791d588 100644 --- a/Python/pyarena.c +++ b/Python/pyarena.c @@ -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); }