diff options
author | Tim Peters <tim.peters@gmail.com> | 2002-07-07 03:59:34 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2002-07-07 03:59:34 (GMT) |
commit | 943382c8e5009da895679798e1e740a0661fbf7e (patch) | |
tree | 8dba4a12cba89a30c2dad53ba8f11eef6d740321 /Objects/object.c | |
parent | 12f4f35f6e675bbe7435069ab7516a48e82f27a9 (diff) | |
download | cpython-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/object.c')
-rw-r--r-- | Objects/object.c | 43 |
1 files changed, 0 insertions, 43 deletions
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); |