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 /Modules | |
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 'Modules')
-rw-r--r-- | Modules/config.c.in | 2 | ||||
-rw-r--r-- | Modules/gcmodule.c | 23 |
2 files changed, 0 insertions, 25 deletions
diff --git a/Modules/config.c.in b/Modules/config.c.in index 0218c8d..3b4d037 100644 --- a/Modules/config.c.in +++ b/Modules/config.c.in @@ -40,10 +40,8 @@ struct _inittab _PyImport_Inittab[] = { {"sys", NULL}, {"exceptions", NULL}, -#ifdef WITH_CYCLE_GC /* This lives in gcmodule.c */ {"gc", initgc}, -#endif /* Sentinel */ {0, 0} diff --git a/Modules/gcmodule.c b/Modules/gcmodule.c index c81a352..5685101 100644 --- a/Modules/gcmodule.c +++ b/Modules/gcmodule.c @@ -20,8 +20,6 @@ #include "Python.h" -#ifdef WITH_CYCLE_GC - /* Get an object's GC head */ #define AS_GC(o) ((PyGC_Head *)(o)-1) @@ -941,8 +939,6 @@ void _PyGC_Dump(PyGC_Head *g) _PyObject_Dump(FROM_GC(g)); } -#endif /* WITH_CYCLE_GC */ - /* extension modules might be compiled with GC support so these functions must always be available */ @@ -967,10 +963,8 @@ _PyObject_GC_Track(PyObject *op) void PyObject_GC_UnTrack(void *op) { -#ifdef WITH_CYCLE_GC if (IS_TRACKED(op)) _PyObject_GC_UNTRACK(op); -#endif } /* for binary compatibility with 2.2 */ @@ -984,7 +978,6 @@ PyObject * _PyObject_GC_Malloc(size_t basicsize) { PyObject *op; -#ifdef WITH_CYCLE_GC PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize); if (g == NULL) return PyErr_NoMemory(); @@ -1000,12 +993,6 @@ _PyObject_GC_Malloc(size_t basicsize) collecting = 0; } op = FROM_GC(g); -#else - op = PyObject_MALLOC(basicsize); - if (op == NULL) - return PyErr_NoMemory(); - -#endif return op; } @@ -1032,17 +1019,11 @@ PyVarObject * _PyObject_GC_Resize(PyVarObject *op, int nitems) { const size_t basicsize = _PyObject_VAR_SIZE(op->ob_type, nitems); -#ifdef WITH_CYCLE_GC PyGC_Head *g = AS_GC(op); g = PyObject_REALLOC(g, sizeof(PyGC_Head) + basicsize); if (g == NULL) return (PyVarObject *)PyErr_NoMemory(); op = (PyVarObject *) FROM_GC(g); -#else - op = PyObject_REALLOC(op, basicsize); - if (op == NULL) - return (PyVarObject *)PyErr_NoMemory(); -#endif op->ob_size = nitems; return op; } @@ -1050,7 +1031,6 @@ _PyObject_GC_Resize(PyVarObject *op, int nitems) void PyObject_GC_Del(void *op) { -#ifdef WITH_CYCLE_GC PyGC_Head *g = AS_GC(op); if (IS_TRACKED(op)) gc_list_remove(g); @@ -1058,9 +1038,6 @@ PyObject_GC_Del(void *op) generations[0].count--; } PyObject_FREE(g); -#else - PyObject_FREE(op); -#endif } /* for binary compatibility with 2.2 */ |