[Zope3-checkins] CVS: Zope3/src/zope/context - wrapper.c:1.29

Tim Peters tim.one at comcast.net
Sat Jan 17 23:20:00 EST 2004


Update of /cvs-repository/Zope3/src/zope/context
In directory cvs.zope.org:/tmp/cvs-serv24469/src/zope/context

Modified Files:
	wrapper.c 
Log Message:
Most Python macros should never be used by extension modules.  This is
especially true of the cyclic GC macros, since different compilers on the
same platform can and do have different ideas about the offsets to members
in the PyGC_Head struct.  Use the function versions instead; then only
core Python contains code that accesses these members, and it doesn't
matter if the compiler compiling the call has some other idea of where
the members live.


=== Zope3/src/zope/context/wrapper.c 1.28 => 1.29 ===
--- Zope3/src/zope/context/wrapper.c:1.28	Tue Sep  2 17:03:08 2003
+++ Zope3/src/zope/context/wrapper.c	Sat Jan 17 23:19:58 2004
@@ -137,7 +137,7 @@
 {
     propertyobject *gs = (propertyobject *)self;
 
-    _PyObject_GC_UNTRACK(self);
+    PyObject_GC_UnTrack(self);
     Py_XDECREF(gs->prop_get);
     Py_XDECREF(gs->prop_set);
     Py_XDECREF(gs->prop_del);
@@ -313,7 +313,7 @@
 static void
 cm_dealloc(ContextMethod *cm)
 {
-    _PyObject_GC_UNTRACK((PyObject *)cm);
+    PyObject_GC_UnTrack((PyObject *)cm);
     Py_XDECREF(cm->cm_callable);
     ContextDescriptorType.tp_dealloc((PyObject *)cm);
 }
@@ -620,14 +620,14 @@
 
     assert(PyTuple_Check(mro));
 
-    n = PyTuple_GET_SIZE(mro) 
+    n = PyTuple_GET_SIZE(mro)
       - 1; /* We don't want to look at the last item, which is object. */
 
     for (i = 0; i < n; i++) {
         base = PyTuple_GET_ITEM(mro, i);
 
         if (
-            ((PyTypeObject *)base) != &ProxyType 
+            ((PyTypeObject *)base) != &ProxyType
             &&
             ((PyTypeObject *)base) != &WrapperType
             ) {




More information about the Zope3-Checkins mailing list