[Zodb-checkins] CVS: Zope3/src/persistent - cPersistence.c:1.80
Jeremy Hylton
jeremy at zope.com
Sat Mar 13 02:42:08 EST 2004
Update of /cvs-repository/Zope3/src/persistent
In directory cvs.zope.org:/tmp/cvs-serv28356/src/persistent
Modified Files:
cPersistence.c
Log Message:
Consistent formatting.
=== Zope3/src/persistent/cPersistence.c 1.79 => 1.80 ===
--- Zope3/src/persistent/cPersistence.c:1.79 Tue Mar 2 15:22:16 2004
+++ Zope3/src/persistent/cPersistence.c Sat Mar 13 02:42:06 2004
@@ -648,7 +648,7 @@
goto Done;
s = PyString_AS_STRING(name);
- if (*s != '_' || unghost_getattr(s)) {
+ if (unghost_getattr(s)) {
if (unghostify(self) < 0)
goto Done;
accessed(self);
@@ -672,15 +672,14 @@
goto Done;
s = PyString_AS_STRING(name);
- if (*s != '_' || unghost_getattr(s))
- {
+ if (*s != '_' || unghost_getattr(s)) {
if (unghostify(self) < 0)
goto Done;
accessed(self);
result = Py_False;
- }
+ }
else
- result = Py_True;
+ result = Py_True;
Py_INCREF(result);
@@ -733,20 +732,18 @@
goto Done;
s = PyString_AS_STRING(name);
- if (strncmp(s, "_p_", 3) != 0)
- {
+ if (strncmp(s, "_p_", 3)) {
if (unghostify(self) < 0)
goto Done;
accessed(self);
result = 0;
- }
- else
- {
+ }
+ else {
if (PyObject_GenericSetAttr((PyObject *)self, name, v) < 0)
- goto Done;
+ goto Done;
result = 1;
- }
+ }
Done:
Py_XDECREF(name);
@@ -756,34 +753,34 @@
static PyObject *
Per__p_setattr(cPersistentObject *self, PyObject *args)
{
- PyObject *name, *v, *result;
- int r;
+ PyObject *name, *v, *result;
+ int r;
- if (! PyArg_ParseTuple(args, "OO:_p_setattr", &name, &v))
- return NULL;
+ if (!PyArg_ParseTuple(args, "OO:_p_setattr", &name, &v))
+ return NULL;
- r = Per_p_set_or_delattro(self, name, v);
- if (r < 0)
- return NULL;
-
- result = r ? Py_True : Py_False;
- Py_INCREF(result);
- return result;
+ r = Per_p_set_or_delattro(self, name, v);
+ if (r < 0)
+ return NULL;
+
+ result = r ? Py_True : Py_False;
+ Py_INCREF(result);
+ return result;
}
static PyObject *
Per__p_delattr(cPersistentObject *self, PyObject *name)
{
- int r;
- PyObject *result;
+ int r;
+ PyObject *result;
- r = Per_p_set_or_delattro(self, name, NULL);
- if (r < 0)
- return NULL;
-
- result = r ? Py_True : Py_False;
- Py_INCREF(result);
- return result;
+ r = Per_p_set_or_delattro(self, name, NULL);
+ if (r < 0)
+ return NULL;
+
+ result = r ? Py_True : Py_False;
+ Py_INCREF(result);
+ return result;
}
More information about the Zodb-checkins
mailing list