[Python-checkins] r58343 - python/trunk/Modules/_bsddb.c
gregory.p.smith
python-checkins at python.org
Sat Oct 6 09:48:10 CEST 2007
Author: gregory.p.smith
Date: Sat Oct 6 09:48:10 2007
New Revision: 58343
Modified:
python/trunk/Modules/_bsddb.c
Log:
Stab in the dark attempt to fix the test_bsddb3 failure on sparc and S-390
ubuntu buildbots.
Modified: python/trunk/Modules/_bsddb.c
==============================================================================
--- python/trunk/Modules/_bsddb.c (original)
+++ python/trunk/Modules/_bsddb.c Sat Oct 6 09:48:10 2007
@@ -4903,14 +4903,20 @@
{
int err;
DBT key;
+ PyObject *retval;
+ key.flags = DB_DBT_MALLOC;
CHECK_SEQUENCE_NOT_CLOSED(self)
MYDB_BEGIN_ALLOW_THREADS
err = self->sequence->get_key(self->sequence, &key);
MYDB_END_ALLOW_THREADS
+ if (!err)
+ retval = PyString_FromStringAndSize(key.data, key.size);
+
+ FREE_DBT(key);
RETURN_IF_ERR();
- return PyString_FromStringAndSize(key.data, key.size);
+ return retval;
}
static PyObject*
More information about the Python-checkins
mailing list