[Python-checkins] python/dist/src/Modules config.c.in,1.75,1.76 gcmodule.c,2.52,2.53
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Sat, 06 Jul 2002 20:59:36 -0700
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv12674/python/Modules
Modified Files:
config.c.in gcmodule.c
Log Message:
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.
Index: config.c.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/config.c.in,v
retrieving revision 1.75
retrieving revision 1.76
diff -C2 -d -r1.75 -r1.76
*** config.c.in 30 Aug 2001 00:12:32 -0000 1.75
--- config.c.in 7 Jul 2002 03:59:34 -0000 1.76
***************
*** 41,48 ****
{"exceptions", NULL},
- #ifdef WITH_CYCLE_GC
/* This lives in gcmodule.c */
{"gc", initgc},
- #endif
/* Sentinel */
--- 41,46 ----
Index: gcmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/gcmodule.c,v
retrieving revision 2.52
retrieving revision 2.53
diff -C2 -d -r2.52 -r2.53
*** gcmodule.c 4 Jul 2002 17:11:36 -0000 2.52
--- gcmodule.c 7 Jul 2002 03:59:34 -0000 2.53
***************
*** 21,26 ****
#include "Python.h"
- #ifdef WITH_CYCLE_GC
-
/* Get an object's GC head */
#define AS_GC(o) ((PyGC_Head *)(o)-1)
--- 21,24 ----
***************
*** 942,947 ****
}
- #endif /* WITH_CYCLE_GC */
-
/* extension modules might be compiled with GC support so these
functions must always be available */
--- 940,943 ----
***************
*** 968,975 ****
PyObject_GC_UnTrack(void *op)
{
- #ifdef WITH_CYCLE_GC
if (IS_TRACKED(op))
_PyObject_GC_UNTRACK(op);
- #endif
}
--- 964,969 ----
***************
*** 985,989 ****
{
PyObject *op;
- #ifdef WITH_CYCLE_GC
PyGC_Head *g = PyObject_MALLOC(sizeof(PyGC_Head) + basicsize);
if (g == NULL)
--- 979,982 ----
***************
*** 1001,1010 ****
}
op = FROM_GC(g);
- #else
- op = PyObject_MALLOC(basicsize);
- if (op == NULL)
- return PyErr_NoMemory();
-
- #endif
return op;
}
--- 994,997 ----
***************
*** 1033,1037 ****
{
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);
--- 1020,1023 ----
***************
*** 1039,1047 ****
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;
--- 1025,1028 ----
***************
*** 1051,1055 ****
PyObject_GC_Del(void *op)
{
- #ifdef WITH_CYCLE_GC
PyGC_Head *g = AS_GC(op);
if (IS_TRACKED(op))
--- 1032,1035 ----
***************
*** 1059,1065 ****
}
PyObject_FREE(g);
- #else
- PyObject_FREE(op);
- #endif
}
--- 1039,1042 ----