[Patches] GC infrastructure patch 2 (type changes)
Neil Schemenauer
nascheme@enme.ucalgary.ca
Thu, 15 Jun 2000 12:53:46 -0600
On Thu, Jun 15, 2000 at 06:05:48AM +0300, Moshe Zadka wrote:
> + /* 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
>
> What's wrong with defining Py_TPFLAGS_GC unconditionally?
Things are done this way so that extension types compiled with
GC disabled will work with a GC enabled interpreter.
> c) You seem to be adding GC information to an awful lot of objects.
> How much of this can be thrown out without affecting GC greatly?
I don't think I can answer that without more Real World(tm) testing.
I thought that method objects were not important until I added GC
support for them. Reference cycles can show up in surprising
places. Just ask Tim Peters. :)
Neil
--
"Simplicity does not precede complexity, but follows it." -- Alan Perlis