summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGregory P. Smith <greg@mad-scientist.com>2003-01-17 07:56:16 (GMT)
committerGregory P. Smith <greg@mad-scientist.com>2003-01-17 07:56:16 (GMT)
commitaa71f5f2b4a295065fe3c96889e7ff902991ec07 (patch)
tree324d5fedf561b3f0d9022a13068aab7508a72e8c
parentc25fd3fb4873ce6691eeeeae8839eb61b1dcad37 (diff)
downloadcpython-aa71f5f2b4a295065fe3c96889e7ff902991ec07.zip
cpython-aa71f5f2b4a295065fe3c96889e7ff902991ec07.tar.gz
cpython-aa71f5f2b4a295065fe3c96889e7ff902991ec07.tar.bz2
bugfix: allow the module to work with python compiled without thread support.
closes sourceforge pybsddb bug id 669533.
-rw-r--r--Modules/_bsddb.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 8b93af3..9561d28 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -1072,7 +1072,9 @@ DB_associate(DBObject* self, PyObject* args, PyObject* kwargs)
* threads have already been initialized.
* (see pybsddb-users mailing list post on 2002-08-07)
*/
+#ifdef WITH_THREAD
PyEval_InitThreads();
+#endif
MYDB_BEGIN_ALLOW_THREADS;
#if (DBVER >= 41)
err = self->db->associate(self->db,