[ZODB-Dev] Wierd vars() behavior

Jeremy Hylton jeremy@zope.com
Thu, 21 Mar 2002 11:04:59 -0500


I think I understand the scope of the bug.  There is a back whole in
the cPersistence implementation.  cPersistence.h introduces two
different object headers: PyPersist_HEAD and PyPersist_INSTANCE_HEAD.
The intention is the C object use PyPersist_INSTANCE_HEAD if they want
to have an __dict__ and PyPersist_HEAD otherwise.

The rest of the implementation ignores this distinction.  There need
to be two types, one for each object header.  Right now, we only have
Persistent, which corresponds to PyPersist_INSTANCE_HEAD.  Since
Persistent is the only type, the b-trees inherit from it.

We need to fix this by implementing a C type for PyPersist_HEAD, say
BasePersistent.  Then Persistent and each of the BTrees extend it.
That's a solid hour's work :-).

Jeremy