]> granicus.if.org Git - python/commitdiff
Remove unused variable from gcmodule.c. The code no longer tests for the
authorKristján Valur Jónsson <kristjan@ccpgames.com>
Sun, 8 Apr 2012 13:56:25 +0000 (13:56 +0000)
committerKristján Valur Jónsson <kristjan@ccpgames.com>
Sun, 8 Apr 2012 13:56:25 +0000 (13:56 +0000)
presence of a __del__ attribute on objects, rather it uses the tp_del slot.

Modules/gcmodule.c

index 1876e93884dda3b2c3499927d01fbcb63739d16b..d8893d1b16aab3773bbcdeec881215500fee9704 100644 (file)
@@ -65,9 +65,6 @@ static PyObject *garbage = NULL;
 /* Python string to use if unhandled exception occurs */
 static PyObject *gc_str = NULL;
 
-/* Python string used to look for __del__ attribute. */
-static PyObject *delstr = NULL;
-
 /* This is the number of objects who survived the last full collection. It
    approximates the number of long lived objects tracked by the GC.
 
@@ -802,12 +799,6 @@ collect(int generation)
     PyGC_Head *gc;
     double t1 = 0.0;
 
-    if (delstr == NULL) {
-        delstr = PyUnicode_InternFromString("__del__");
-        if (delstr == NULL)
-            Py_FatalError("gc couldn't allocate \"__del__\"");
-    }
-
     if (debug & DEBUG_STATS) {
         PySys_WriteStderr("gc: collecting generation %d...\n",
                           generation);