[Zodb-checkins] CVS: Zope/lib/python/BTrees - BTreeTemplate.c:1.17.2.1
Andreas Jung
andreas@zope.com
Mon, 13 Aug 2001 15:02:03 -0400
Update of /cvs-repository/Zope/lib/python/BTrees
In directory cvs.zope.org:/tmp/cvs-serv22633/BTrees
Modified Files:
Tag: Zope-2_4-branch
BTreeTemplate.c
Log Message:
Fixed broken conflict resolution
_p_resolveConflict could not handle tuples from getstate()
properly
=== Zope/lib/python/BTrees/BTreeTemplate.c 1.17 => 1.17.2.1 ===
int i;
- UNLESS (PyArg_ParseTuple(args, "OOO", s, s+1, s+2)) return NULL;
+ r = NULL;
+
+ UNLESS (PyArg_ParseTuple(args, "OOO", s, s+1, s+2)) goto err;
/* for each state, detuplefy it twice */
for (i=0; i < 3; i++)
- UNLESS (s[i]==Py_None || PyArg_ParseTuple(s[i], "O", s+i)) return NULL;
+ UNLESS (s[i]==Py_None || PyArg_ParseTuple(s[i], "O", s+i)) goto err;
for (i=0; i < 3; i++)
- UNLESS (s[i]==Py_None || PyArg_ParseTuple(s[i], "O", s+i)) return NULL;
+ UNLESS (s[i]==Py_None || PyArg_ParseTuple(s[i], "O", s+i)) goto err;
for (i=0; i < 3; i++) /* Now make sure detupled thing is a tuple */
UNLESS (s[i]==Py_None || PyTuple_Check(s[i]))
@@ -861,6 +863,8 @@
r = _bucket__p_resolveConflict(OBJECT(&BucketType), s);
else
r = _bucket__p_resolveConflict(OBJECT(&SetType), s);
+
+err:
if (r) {
ASSIGN(r, Py_BuildValue("((O))", r));