[Zodb-checkins] SVN: ZODB/branches/alienoid-btrees_pop/src/BTrees/B
a bit simpler code.
Ruslan Spivak
rspivak at nuxeo.com
Tue Aug 30 17:01:34 EDT 2005
Log message for revision 38170:
a bit simpler code.
Changed:
U ZODB/branches/alienoid-btrees_pop/src/BTrees/BTreeTemplate.c
U ZODB/branches/alienoid-btrees_pop/src/BTrees/BucketTemplate.c
-=-
Modified: ZODB/branches/alienoid-btrees_pop/src/BTrees/BTreeTemplate.c
===================================================================
--- ZODB/branches/alienoid-btrees_pop/src/BTrees/BTreeTemplate.c 2005-08-30 20:53:15 UTC (rev 38169)
+++ ZODB/branches/alienoid-btrees_pop/src/BTrees/BTreeTemplate.c 2005-08-30 21:01:34 UTC (rev 38170)
@@ -1768,15 +1768,13 @@
PyErr_SetString(PyExc_KeyError, "pop(): dictionary is empty");
return NULL;
}
- PyErr_Clear();
- Py_INCREF(failobj);
- return failobj;
+ goto rdefault;
}
/* btree is not empty */
if (failobj == NULL)
return NULL;
-
+rdefault:
PyErr_Clear();
Py_INCREF(failobj);
return failobj;
Modified: ZODB/branches/alienoid-btrees_pop/src/BTrees/BucketTemplate.c
===================================================================
--- ZODB/branches/alienoid-btrees_pop/src/BTrees/BucketTemplate.c 2005-08-30 20:53:15 UTC (rev 38169)
+++ ZODB/branches/alienoid-btrees_pop/src/BTrees/BucketTemplate.c 2005-08-30 21:01:34 UTC (rev 38170)
@@ -1327,15 +1327,13 @@
PyErr_SetString(PyExc_KeyError, "pop(): dictionary is empty");
return NULL;
}
- PyErr_Clear();
- Py_INCREF(failobj);
- return failobj;
+ goto rdefault;
}
/* bucket is not empty */
if (failobj == NULL)
return NULL;
-
+rdefault:
PyErr_Clear();
Py_INCREF(failobj);
return failobj;
More information about the Zodb-checkins
mailing list