summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-08-29 23:46:35 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-08-29 23:46:35 (GMT)
commit31ec1428087311d9b3926bd00cd8ebe393746f17 (patch)
treee2d350e80a75c55d13ab022302db578f37d3c204
parent251ead8dd80583ee4d533b3707495cf816036027 (diff)
downloadcpython-31ec1428087311d9b3926bd00cd8ebe393746f17.zip
cpython-31ec1428087311d9b3926bd00cd8ebe393746f17.tar.gz
cpython-31ec1428087311d9b3926bd00cd8ebe393746f17.tar.bz2
Change the GC type flag since the API has changed. Allow types using
the old flag to still compile.
-rw-r--r--Include/object.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/Include/object.h b/Include/object.h
index 740ee44..6cd20a6 100644
--- a/Include/object.h
+++ b/Include/object.h
@@ -389,12 +389,9 @@ given type object has a specified feature.
/* PySequenceMethods contains sq_contains */
#define Py_TPFLAGS_HAVE_SEQUENCE_IN (1L<<1)
-/* Objects which participate in garbage collection (see objimp.h) */
-#ifdef WITH_CYCLE_GC
-#define Py_TPFLAGS_GC (1L<<2)
-#else
-#define Py_TPFLAGS_GC 0
-#endif
+/* This is here for backwards compatibility. Extensions that use the old GC
+ * API will still compile but the objects will not be tracked by the GC. */
+#define Py_TPFLAGS_GC 0 /* used to be (1L<<2) */
/* PySequenceMethods and PyNumberMethods contain in-place operators */
#define Py_TPFLAGS_HAVE_INPLACEOPS (1L<<3)
@@ -429,6 +426,13 @@ given type object has a specified feature.
/* Set while the type is being 'readied', to prevent recursive ready calls */
#define Py_TPFLAGS_READYING (1L<<13)
+/* 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 ( \
Py_TPFLAGS_HAVE_GETCHARBUFFER | \
Py_TPFLAGS_HAVE_SEQUENCE_IN | \