You are viewing a plain text version of this content. The canonical link for it is here.
Posted to mod_python-commits@quetz.apache.org by nl...@apache.org on 2005/09/11 10:09:34 UTC
svn commit: r280093 - in /httpd/mod_python/trunk/src: include/mpversion.h
mod_python.c
Author: nlehuen
Date: Sun Sep 11 01:09:30 2005
New Revision: 280093
URL: http://svn.apache.org/viewcvs?rev=280093&view=rev
Log:
Added tests for the presence of the APR thread library.
Modified:
httpd/mod_python/trunk/src/include/mpversion.h
httpd/mod_python/trunk/src/mod_python.c
Modified: httpd/mod_python/trunk/src/include/mpversion.h
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/include/mpversion.h?rev=280093&r1=280092&r2=280093&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/include/mpversion.h (original)
+++ httpd/mod_python/trunk/src/include/mpversion.h Sun Sep 11 01:09:30 2005
@@ -1,5 +1,5 @@
#define MPV_MAJOR 3
#define MPV_MINOR 2
#define MPV_PATCH 0
-#define MPV_BUILD 20050908
-#define MPV_STRING "3.2.0-dev-20050908"
+#define MPV_BUILD 20050911
+#define MPV_STRING "3.2.0-dev-20050911"
Modified: httpd/mod_python/trunk/src/mod_python.c
URL: http://svn.apache.org/viewcvs/httpd/mod_python/trunk/src/mod_python.c?rev=280093&r1=280092&r2=280093&view=diff
==============================================================================
--- httpd/mod_python/trunk/src/mod_python.c (original)
+++ httpd/mod_python/trunk/src/mod_python.c Sun Sep 11 01:09:30 2005
@@ -31,7 +31,7 @@
* (In a Python dictionary) */
static PyObject * interpreters = NULL;
-#ifdef WITH_THREAD
+#if defined(WITH_THREAD) && defined(APR_HAS_THREADS)
static apr_thread_mutex_t* interpreters_lock = 0;
#endif
@@ -130,7 +130,9 @@
name = MAIN_INTERPRETER;
#ifdef WITH_THREAD
- apr_thread_mutex_lock(interpreters_lock);
+ #ifdef APR_HAS_THREADS
+ apr_thread_mutex_lock(interpreters_lock);
+ #endif
PyEval_AcquireLock();
#endif
@@ -160,7 +162,9 @@
#ifdef WITH_THREAD
PyEval_ReleaseLock();
- apr_thread_mutex_unlock(interpreters_lock);
+ #ifdef APR_HAS_THREADS
+ apr_thread_mutex_unlock(interpreters_lock);
+ #endif
#endif
if (! idata) {
@@ -516,7 +520,9 @@
Py_Initialize();
#ifdef WITH_THREAD
- apr_thread_mutex_create(&interpreters_lock,APR_THREAD_MUTEX_UNNESTED,p);
+ #ifdef APR_HAS_THREADS
+ apr_thread_mutex_create(&interpreters_lock,APR_THREAD_MUTEX_UNNESTED,p);
+ #endif
/* create and acquire the interpreter lock */
PyEval_InitThreads();
#endif