Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aa71f5f

Browse files
committed
bugfix: allow the module to work with python compiled without thread support.
closes sourceforge pybsddb bug id 669533.
1 parent c25fd3f commit aa71f5f

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

Modules/_bsddb.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,9 @@ DB_associate(DBObject* self, PyObject* args, PyObject* kwargs)
10721072
* threads have already been initialized.
10731073
* (see pybsddb-users mailing list post on 2002-08-07)
10741074
*/
1075+
#ifdef WITH_THREAD
10751076
PyEval_InitThreads();
1077+
#endif
10761078
MYDB_BEGIN_ALLOW_THREADS;
10771079
#if (DBVER >= 41)
10781080
err = self->db->associate(self->db,

0 commit comments

Comments
 (0)