[Python-checkins] r87718 - in python/branches/py3k: Include/objimpl.h Misc/NEWS Modules/gcmodule.c Modules/pyexpat.c

antoine.pitrou python-checkins at python.org
Tue Jan 4 01:00:31 CET 2011


Author: antoine.pitrou
Date: Tue Jan  4 01:00:31 2011
New Revision: 87718

Log:
Issue #10333: Remove ancient GC API, which has been deprecated since
Python 2.2.



Modified:
   python/branches/py3k/Include/objimpl.h
   python/branches/py3k/Misc/NEWS
   python/branches/py3k/Modules/gcmodule.c
   python/branches/py3k/Modules/pyexpat.c

Modified: python/branches/py3k/Include/objimpl.h
==============================================================================
--- python/branches/py3k/Include/objimpl.h	(original)
+++ python/branches/py3k/Include/objimpl.h	Tue Jan  4 01:00:31 2011
@@ -242,9 +242,6 @@
 #define PyObject_GC_Resize(type, op, n) \
                 ( (type *) _PyObject_GC_Resize((PyVarObject *)(op), (n)) )
 
-/* for source compatibility with 2.2 */
-#define _PyObject_GC_Del PyObject_GC_Del
-
 /* GC information is stored BEFORE the object structure. */
 #ifndef Py_LIMITED_API
 typedef union _gc_head {
@@ -328,15 +325,6 @@
         }                                                               \
     } while (0)
 
-/* This is here for the sake of backwards compatibility.  Extensions that
- * use the old GC API will still compile but the objects will not be
- * tracked by the GC. */
-#define PyGC_HEAD_SIZE 0
-#define PyObject_GC_Init(op)
-#define PyObject_GC_Fini(op)
-#define PyObject_AS_GC(op) (op)
-#define PyObject_FROM_GC(op) (op)
-
 
 /* Test if a type supports weak references */
 #define PyType_SUPPORTS_WEAKREFS(t) ((t)->tp_weaklistoffset > 0)

Modified: python/branches/py3k/Misc/NEWS
==============================================================================
--- python/branches/py3k/Misc/NEWS	(original)
+++ python/branches/py3k/Misc/NEWS	Tue Jan  4 01:00:31 2011
@@ -101,6 +101,12 @@
 
 - Deprecated assertDictContainsSubset() in the unittest module.
 
+C-API
+-----
+
+- Issue #10333: Remove ancient GC API, which has been deprecated since
+  Python 2.2.
+
 Build
 -----
 

Modified: python/branches/py3k/Modules/gcmodule.c
==============================================================================
--- python/branches/py3k/Modules/gcmodule.c	(original)
+++ python/branches/py3k/Modules/gcmodule.c	Tue Jan  4 01:00:31 2011
@@ -1511,11 +1511,3 @@
     }
     PyObject_FREE(g);
 }
-
-/* for binary compatibility with 2.2 */
-#undef _PyObject_GC_Del
-void
-_PyObject_GC_Del(PyObject *op)
-{
-    PyObject_GC_Del(op);
-}

Modified: python/branches/py3k/Modules/pyexpat.c
==============================================================================
--- python/branches/py3k/Modules/pyexpat.c	(original)
+++ python/branches/py3k/Modules/pyexpat.c	Tue Jan  4 01:00:31 2011
@@ -1522,7 +1522,7 @@
 static PyTypeObject Xmlparsetype = {
         PyVarObject_HEAD_INIT(NULL, 0)
         "pyexpat.xmlparser",            /*tp_name*/
-        sizeof(xmlparseobject) + PyGC_HEAD_SIZE,/*tp_basicsize*/
+        sizeof(xmlparseobject),         /*tp_basicsize*/
         0,                              /*tp_itemsize*/
         /* methods */
         (destructor)xmlparse_dealloc,   /*tp_dealloc*/


More information about the Python-checkins mailing list