[Python-checkins] python/dist/src/Include Python.h,2.52,2.53 object.h,2.101,2.102 objimpl.h,2.55,2.56

tim_one@users.sourceforge.net tim_one@users.sourceforge.net
Sat, 06 Jul 2002 20:59:35 -0700


Update of /cvsroot/python/python/dist/src/Include
In directory usw-pr-cvs1:/tmp/cvs-serv12674/python/Include

Modified Files:
	Python.h object.h objimpl.h 
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: Python.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/Python.h,v
retrieving revision 2.52
retrieving revision 2.53
diff -C2 -d -r2.52 -r2.53
*** Python.h	20 Jun 2002 22:23:15 -0000	2.52
--- Python.h	7 Jul 2002 03:59:33 -0000	2.53
***************
*** 24,27 ****
--- 24,35 ----
  #include "pyconfig.h"
  
+ /* Cyclic gc is always enabled, starting with release 2.3a1.  Supply the
+  * old symbol for the benefit of extension modules written before then
+  * that may be conditionalizing on it.  The core doesn't use it anymore.
+  */
+ #ifndef WITH_CYCLE_GC
+ #define WITH_CYCLE_GC 1
+ #endif
+ 
  #ifdef HAVE_LIMITS_H
  #include <limits.h>

Index: object.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/object.h,v
retrieving revision 2.101
retrieving revision 2.102
diff -C2 -d -r2.101 -r2.102
*** object.h	12 Apr 2002 01:57:06 -0000	2.101
--- object.h	7 Jul 2002 03:59:33 -0000	2.102
***************
*** 442,450 ****
  
  /* Objects support garbage collection (see objimp.h) */
- #ifdef WITH_CYCLE_GC
  #define Py_TPFLAGS_HAVE_GC (1L<<14)
- #else
- #define Py_TPFLAGS_HAVE_GC 0
- #endif
  
  #define Py_TPFLAGS_DEFAULT  ( \
--- 442,446 ----

Index: objimpl.h
===================================================================
RCS file: /cvsroot/python/python/dist/src/Include/objimpl.h,v
retrieving revision 2.55
retrieving revision 2.56
diff -C2 -d -r2.55 -r2.56
*** objimpl.h	2 Jul 2002 18:12:34 -0000	2.55
--- objimpl.h	7 Jul 2002 03:59:33 -0000	2.56
***************
*** 227,234 ****
   * Garbage Collection Support
   * ==========================
-  *
-  * Some of the functions and macros below are always defined; when
-  * WITH_CYCLE_GC is undefined, they simply don't do anything different
-  * than their non-GC counterparts.
   */
  
--- 227,230 ----
***************
*** 247,252 ****
  #define _PyObject_GC_Del PyObject_GC_Del
  
- #ifdef WITH_CYCLE_GC
- 
  /* GC information is stored BEFORE the object structure. */
  typedef union _gc_head {
--- 243,246 ----
***************
*** 305,321 ****
  		( (type *) _PyObject_GC_NewVar((typeobj), (n)) )
  
- 
- #else /* !WITH_CYCLE_GC */
- 
- #define _PyObject_GC_Malloc	PyObject_Malloc
- #define PyObject_GC_New		PyObject_New
- #define PyObject_GC_NewVar	PyObject_NewVar
- #define PyObject_GC_Del		PyObject_Del
- #define _PyObject_GC_TRACK(op)
- #define _PyObject_GC_UNTRACK(op)
- #define PyObject_GC_Track(op)
- #define PyObject_GC_UnTrack(op)
- 
- #endif
  
  /* This is here for the sake of backwards compatibility.  Extensions that
--- 299,302 ----