[Python-checkins] r41922 - in python/branches/release24-maint: Misc/NEWS Modules/_bsddb.c
neal.norwitz
python-checkins at python.org
Thu Jan 5 09:00:58 CET 2006
Author: neal.norwitz
Date: Thu Jan 5 09:00:55 2006
New Revision: 41922
Modified:
python/branches/release24-maint/Misc/NEWS
python/branches/release24-maint/Modules/_bsddb.c
Log:
Backport 38951:
fixes pybsddb SF bug id 1215432. DB.associate() would crash when a
DBError was supposed to be raised.
Modified: python/branches/release24-maint/Misc/NEWS
==============================================================================
--- python/branches/release24-maint/Misc/NEWS (original)
+++ python/branches/release24-maint/Misc/NEWS Thu Jan 5 09:00:55 2006
@@ -38,6 +38,9 @@
Extension Modules
-----------------
+- Bug #1215432: in bsddb DB.associate() would crash when a DBError
+ was supposed to be raised.
+
- Fix 64-bit problems in bsddb.
- Bug #1290333: Added a workaround for cjkcodecs' _codecs_cn build
Modified: python/branches/release24-maint/Modules/_bsddb.c
==============================================================================
--- python/branches/release24-maint/Modules/_bsddb.c (original)
+++ python/branches/release24-maint/Modules/_bsddb.c Thu Jan 5 09:00:55 2006
@@ -1174,9 +1174,7 @@
}
/* Save a reference to the callback in the secondary DB. */
- if (self->associateCallback != NULL) {
- Py_DECREF(self->associateCallback);
- }
+ Py_XDECREF(secondaryDB->associateCallback);
Py_INCREF(callback);
secondaryDB->associateCallback = callback;
secondaryDB->primaryDBType = _DB_get_type(self);
@@ -1210,8 +1208,8 @@
MYDB_END_ALLOW_THREADS;
if (err) {
- Py_DECREF(self->associateCallback);
- self->associateCallback = NULL;
+ Py_XDECREF(secondaryDB->associateCallback);
+ secondaryDB->associateCallback = NULL;
secondaryDB->primaryDBType = 0;
}
More information about the Python-checkins
mailing list