[Python-checkins] cpython: Remove unused variable from gcmodule.c. The code no longer tests for the
kristjan.jonsson
python-checkins at python.org
Sun Apr 8 15:57:23 CEST 2012
http://hg.python.org/cpython/rev/65fd991684fa
changeset: 76161:65fd991684fa
user: Kristján Valur Jónsson <kristjan at ccpgames.com>
date: Sun Apr 08 13:56:25 2012 +0000
summary:
Remove unused variable from gcmodule.c. The code no longer tests for the
presence of a __del__ attribute on objects, rather it uses the tp_del slot.
files:
Modules/gcmodule.c | 9 ---------
1 files changed, 0 insertions(+), 9 deletions(-)
diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c
--- a/Modules/gcmodule.c
+++ b/Modules/gcmodule.c
@@ -65,9 +65,6 @@
/* 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 @@
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);
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list