Commit 0d0f042e authored by matt@zope.com's avatar matt@zope.com

Move error trap to inner function rather than outer

parent 75d26332
......@@ -82,7 +82,7 @@
****************************************************************************/
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.16 2001/06/20 19:32:55 matt Exp $\n"
#define BUCKETTEMPLATE_C "$Id: BucketTemplate.c,v 1.17 2001/06/20 19:47:00 matt Exp $\n"
/*
** _bucket_get
......@@ -1113,21 +1113,7 @@ _bucket__p_resolveConflict(PyObject *ob_type, PyObject *s[3])
Py_DECREF(b[1]);
Py_DECREF(b[2]);
return r;
}
static PyObject *
bucket__p_resolveConflict(Bucket *self, PyObject *args)
{
PyObject *s[3];
PyObject *result;
UNLESS(PyArg_ParseTuple(args, "OOO", &s[0], &s[1], &s[2])) return NULL;
result = _bucket__p_resolveConflict(OBJECT(self->ob_type), s);
/* Change any errors to ConflictErrors */
if (result == NULL) {
if (r == NULL) {
PyObject *error;
PyObject *value;
PyObject *traceback;
......@@ -1138,7 +1124,17 @@ bucket__p_resolveConflict(Bucket *self, PyObject *args)
PyErr_Restore(ConflictError, value, traceback);
}
return result;
return r;
}
static PyObject *
bucket__p_resolveConflict(Bucket *self, PyObject *args)
{
PyObject *s[3];
UNLESS(PyArg_ParseTuple(args, "OOO", &s[0], &s[1], &s[2])) return NULL;
return _bucket__p_resolveConflict(OBJECT(self->ob_type), s);
}
#endif
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment