[Python-Dev] Re: [Python-checkins] CVS: python/dist/src/Include cellobject.h,NONE,2.1 Python.h,2.30,2.31

Jeremy Hylton jeremy@alum.mit.edu
Thu, 25 Jan 2001 16:42:04 -0500 (EST)


>>>>> "NS" == Neil Schemenauer <nas@arctrix.com> writes:

  NS> On Thu, Jan 25, 2001 at 12:04:16PM -0800, Jeremy Hylton wrote:
  >> A cell contains a reference to a single PyObject.  It could be
  >> implemented as a mutable, one-element sequence, but the separate
  >> type has less overhead.

  NS> Can this object be involved in reference cycles?  If so, it
  NS> should probably have the GC methods added to it.

It's already there.  (Last five lines of cellobject.c quoted as
proof.) 

>	Py_TPFLAGS_DEFAULT | Py_TPFLAGS_GC,	/* tp_flags */
> 	0,					/* tp_doc */
> 	(traverseproc)cell_traverse,		/* tp_traverse */
> 	(inquiry)cell_clear,			/* tp_clear */
>};