[Zope3-checkins] CVS: Zope3/src/zope/app/container -
_zope_app_container_contained.c:1.4
Jeremy Hylton
jeremy at zope.com
Fri Mar 12 14:51:17 EST 2004
Update of /cvs-repository/Zope3/src/zope/app/container
In directory cvs.zope.org:/tmp/cvs-serv14010
Modified Files:
_zope_app_container_contained.c
Log Message:
Get rid of po_serial code that was only needed with ZODB 4.
This class was providing its own _p_serial attribute, with different
semantics than Persistent. Persistent provides _p_serial in ZODB 3,
so removing this code allows the base class to handle it.
=== Zope3/src/zope/app/container/_zope_app_container_contained.c 1.3 => 1.4 ===
--- Zope3/src/zope/app/container/_zope_app_container_contained.c:1.3 Fri Feb 20 11:56:44 2004
+++ Zope3/src/zope/app/container/_zope_app_container_contained.c Fri Mar 12 14:51:17 2004
@@ -35,9 +35,8 @@
static PyObject *str_p_deactivate;
typedef struct {
- cPersistent_HEAD
- PyObject *po_serial;
- PyObject *po_weaklist;
+ cPersistent_HEAD
+ PyObject *po_weaklist;
PyObject *proxy_object;
PyObject *__parent__;
PyObject *__name__;
@@ -221,7 +220,6 @@
#include "structmember.h"
static PyMemberDef CP_members[] = {
- {"_p_serial", T_OBJECT, offsetof(ProxyObject, po_serial)},
{"__parent__", T_OBJECT, offsetof(ProxyObject, __parent__)},
{"__name__", T_OBJECT, offsetof(ProxyObject, __name__)},
{NULL} /* Sentinel */
@@ -232,8 +230,6 @@
{
if (cPersistenceCAPI->pertype->tp_traverse((PyObject *)self, visit, arg) < 0)
return -1;
- if (self->po_serial != NULL && visit(self->po_serial, arg) < 0)
- return -1;
if (self->proxy_object != NULL && visit(self->proxy_object, arg) < 0)
return -1;
if (self->__parent__ != NULL && visit(self->__parent__, arg) < 0)
@@ -258,7 +254,6 @@
if (cPersistenceCAPI->pertype->tp_clear != NULL)
cPersistenceCAPI->pertype->tp_clear((PyObject*)self);
- CLEAR(self->po_serial);
CLEAR(self->proxy_object);
CLEAR(self->__parent__);
CLEAR(self->__name__);
@@ -272,7 +267,6 @@
if (self->po_weaklist != NULL)
PyObject_ClearWeakRefs((PyObject *)self);
- CLEAR(self->po_serial);
CLEAR(self->proxy_object);
CLEAR(self->__parent__);
CLEAR(self->__name__);
More information about the Zope3-Checkins
mailing list