]> granicus.if.org Git - python/commitdiff
bugfix: allow the module to work with python compiled without thread support.
authorGregory P. Smith <greg@mad-scientist.com>
Fri, 17 Jan 2003 07:56:16 +0000 (07:56 +0000)
committerGregory P. Smith <greg@mad-scientist.com>
Fri, 17 Jan 2003 07:56:16 +0000 (07:56 +0000)
closes sourceforge pybsddb bug id 669533.

Modules/_bsddb.c

index 8b93af387cd51c3fc416e61b64e81df80a33551f..9561d2805ec725719f161836c69822f86033e4f9 100644 (file)
@@ -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,