[Zodb-checkins] CVS: ZODB3/Persistence - cPersistence.c:1.72.8.2
Jeremy Hylton
jeremy at zope.com
Tue Jul 1 16:44:06 EDT 2003
Update of /cvs-repository/ZODB3/Persistence
In directory cvs.zope.org:/tmp/cvs-serv30936
Modified Files:
Tag: zodb33-devel-branch
cPersistence.c
Log Message:
Remove OBJECT() macro.
=== ZODB3/Persistence/cPersistence.c 1.72.8.1 => 1.72.8.2 ===
--- ZODB3/Persistence/cPersistence.c:1.72.8.1 Tue Jul 1 15:28:11 2003
+++ ZODB3/Persistence/cPersistence.c Tue Jul 1 15:44:05 2003
@@ -25,7 +25,6 @@
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS_ASSIGN(V,E) ASSIGN(V,E) UNLESS(V)
-#define OBJECT(V) ((PyObject*)(V))
static PyObject *py_keys, *py_setstate, *py___dict__, *py_timeTime;
static PyObject *py__p_changed, *py__p_deactivate;
@@ -261,7 +260,7 @@
if (args && !PyArg_ParseTuple(args, "|O:__changed__", &v))
return NULL;
if (!v)
- return PyObject_GetAttr(OBJECT(self), py__p_changed);
+ return PyObject_GetAttr((PyObject *)self, py__p_changed);
if (PyObject_IsTrue(v)) {
if (changed(self) < 0)
@@ -516,7 +515,7 @@
if (strcmp(n,"erial")==0)
return PyString_FromStringAndSize(self->serial, 8);
if (strcmp(n,"elf")==0)
- return orNothing(OBJECT(self));
+ return orNothing((PyObject *)self);
break;
case 'm':
if (strcmp(n,"time")==0)
@@ -662,7 +661,7 @@
if (deactivate)
{
PyObject *res;
- PyObject *meth = PyObject_GetAttr(OBJECT(self),
+ PyObject *meth = PyObject_GetAttr((PyObject *)self,
py__p_deactivate);
if (meth == NULL)
return -1;
@@ -723,7 +722,7 @@
r = _setattro(self, oname, v);
if (r < 1) return r;
- m=PyObject_GetAttr(OBJECT(self), py___setattr__);
+ m=PyObject_GetAttr((PyObject *)self, py___setattr__);
if (m)
{
ASSIGN(m, PyObject_CallFunction(m, "OO", oname, v));
@@ -735,7 +734,7 @@
r=_setattro(self,oname, v);
if (r < 1) return r;
- m=PyObject_GetAttr(OBJECT(self), py___delattr__);
+ m=PyObject_GetAttr((PyObject *)self, py___delattr__);
if (m)
{
ASSIGN(m, PyObject_CallFunction(m, "O", oname));
More information about the Zodb-checkins
mailing list