diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-23 19:37:02 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2000-06-23 19:37:02 (GMT) |
commit | d08b4c4524a31695d7e63768c02f472c9cb54fbd (patch) | |
tree | b81cade431fa30d6446fef0122a3796b0876c8a2 /Include/object.h | |
parent | d22162bac7e42ccf90571ee2607c9c42ed2df3fe (diff) | |
download | cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.zip cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.tar.gz cpython-d08b4c4524a31695d7e63768c02f472c9cb54fbd.tar.bz2 |
part 2 of Neil Schemenauer's GC patches:
This patch modifies the type structures of objects that
participate in GC. The object's tp_basicsize is increased when
GC is enabled. GC information is prefixed to the object to
maintain binary compatibility. GC objects also define the
tp_flag Py_TPFLAGS_GC.
Diffstat (limited to 'Include/object.h')
-rw-r--r-- | Include/object.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/object.h b/Include/object.h index e18e0e8..2250b7f 100644 --- a/Include/object.h +++ b/Include/object.h @@ -325,6 +325,13 @@ 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 + #define Py_TPFLAGS_DEFAULT (Py_TPFLAGS_HAVE_GETCHARBUFFER | \ Py_TPFLAGS_HAVE_SEQUENCE_IN) |