[Zodb-checkins] CVS: Zope3/src/persistence - persistence.c:1.11
Jeremy Hylton
jeremy@zope.com
Thu, 10 Apr 2003 13:55:25 -0400
Update of /cvs-repository/Zope3/src/persistence
In directory cvs.zope.org:/tmp/cvs-serv407
Modified Files:
persistence.c
Log Message:
Initialize dictoffset from new not type.
(Zope collector #86.)
Also remove a few old XXX comments.
=== Zope3/src/persistence/persistence.c 1.10 => 1.11 ===
--- Zope3/src/persistence/persistence.c:1.10 Thu Apr 3 19:00:20 2003
+++ Zope3/src/persistence/persistence.c Thu Apr 10 13:55:25 2003
@@ -431,8 +431,6 @@
Implement with simple check on s_name[0] to avoid two strncmp()
calls for all attribute names that don't start with an
underscore.
-
- XXX Don't revive a ghost just to get its __class__.
*/
if (persist_checkattr(s_name)) {
@@ -476,8 +474,6 @@
return attr;
}
-/* XXX why is __dict__ special? */
-
/* persist_setattr_setup() will load the object's state if necessary.
Return values:
@@ -864,7 +860,7 @@
}
else
/* XXX Should be aligned properly */
- new->tp_dictoffset = type->tp_basicsize;
+ new->tp_dictoffset = new->tp_basicsize;
new->tp_basicsize += sizeof(PyObject *);
/* Put a descriptor for __dict__ in the type's __dict__.