summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2002-07-07 03:59:34 (GMT)
committerTim Peters <tim.peters@gmail.com>2002-07-07 03:59:34 (GMT)
commit943382c8e5009da895679798e1e740a0661fbf7e (patch)
tree8dba4a12cba89a30c2dad53ba8f11eef6d740321 /Objects
parent12f4f35f6e675bbe7435069ab7516a48e82f27a9 (diff)
downloadcpython-943382c8e5009da895679798e1e740a0661fbf7e.zip
cpython-943382c8e5009da895679798e1e740a0661fbf7e.tar.gz
cpython-943382c8e5009da895679798e1e740a0661fbf7e.tar.bz2
Removed WITH_CYCLE_GC #ifdef-ery. Holes:
+ I'm not sure what to do about configure.in. Left it alone. + Ditto pyexpat.c. Fred or Martin will know what to do.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/classobject.c3
-rw-r--r--Objects/object.c43
2 files changed, 0 insertions, 46 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c
index 88bd20c..90a0e22 100644
--- a/Objects/classobject.c
+++ b/Objects/classobject.c
@@ -678,9 +678,6 @@ instance_dealloc(register PyInstanceObject *inst)
/* compensate for increment in _Py_ForgetReference */
inst->ob_type->tp_frees--;
#endif
-#ifndef WITH_CYCLE_GC
- inst->ob_type = NULL;
-#endif
#endif
Py_DECREF(inst->in_class);
Py_XDECREF(inst->in_dict);
diff --git a/Objects/object.c b/Objects/object.c
index 206746b..8d670c9 100644
--- a/Objects/object.c
+++ b/Objects/object.c
@@ -2080,29 +2080,8 @@ PyObject * _PyTrash_delete_later = NULL;
void
_PyTrash_deposit_object(PyObject *op)
{
-#ifndef WITH_CYCLE_GC
- int typecode;
-
- if (PyTuple_Check(op))
- typecode = Py_TRASHCAN_TUPLE;
- else if (PyList_Check(op))
- typecode = Py_TRASHCAN_LIST;
- else if (PyDict_Check(op))
- typecode = Py_TRASHCAN_DICT;
- else if (PyFrame_Check(op))
- typecode = Py_TRASHCAN_FRAME;
- else if (PyTraceBack_Check(op))
- typecode = Py_TRASHCAN_TRACEBACK;
- else /* We have a bug here -- those are the only types in GC */ {
- Py_FatalError("Type not supported in GC -- internal bug");
- return; /* pacify compiler -- execution never here */
- }
- op->ob_refcnt = typecode;
- op->ob_type = (PyTypeObject*)_PyTrash_delete_later;
-#else
assert (_Py_AS_GC(op)->gc.gc_next == NULL);
_Py_AS_GC(op)->gc.gc_prev = (PyGC_Head *)_PyTrash_delete_later;
-#endif
_PyTrash_delete_later = op;
}
@@ -2112,30 +2091,8 @@ _PyTrash_destroy_chain(void)
while (_PyTrash_delete_later) {
PyObject *shredder = _PyTrash_delete_later;
-#ifndef WITH_CYCLE_GC
- _PyTrash_delete_later = (PyObject*) shredder->ob_type;
-
- switch (shredder->ob_refcnt) {
- case Py_TRASHCAN_TUPLE:
- shredder->ob_type = &PyTuple_Type;
- break;
- case Py_TRASHCAN_LIST:
- shredder->ob_type = &PyList_Type;
- break;
- case Py_TRASHCAN_DICT:
- shredder->ob_type = &PyDict_Type;
- break;
- case Py_TRASHCAN_FRAME:
- shredder->ob_type = &PyFrame_Type;
- break;
- case Py_TRASHCAN_TRACEBACK:
- shredder->ob_type = &PyTraceBack_Type;
- break;
- }
-#else
_PyTrash_delete_later =
(PyObject*) _Py_AS_GC(shredder)->gc.gc_prev;
-#endif
_Py_NewReference(shredder);