[Python-checkins] cpython (3.3): Issue #14432: Fix compilation when thread support is disabled

victor.stinner python-checkins at python.org
Fri Dec 13 02:33:14 CET 2013


http://hg.python.org/cpython/rev/2f975036cf39
changeset:   87920:2f975036cf39
branch:      3.3
parent:      87918:0875e5bbe5f0
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Fri Dec 13 02:30:12 2013 +0100
summary:
  Issue #14432: Fix compilation when thread support is disabled

files:
  Modules/_testcapimodule.c |  4 ++++
  1 files changed, 4 insertions(+), 0 deletions(-)


diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -2477,6 +2477,7 @@
     return Py_BuildValue("Nl", _PyLong_FromTime_t(sec), nsec);
 }
 
+#ifdef WITH_THREAD
 typedef struct {
     PyThread_type_lock start_event;
     PyThread_type_lock exit_event;
@@ -2563,6 +2564,7 @@
         PyThread_free_lock(test_c_thread.exit_event);
     return res;
 }
+#endif   /* WITH_THREAD */
 
 
 static PyMethodDef TestMethods[] = {
@@ -2661,8 +2663,10 @@
     {"pytime_object_to_time_t", test_pytime_object_to_time_t,  METH_VARARGS},
     {"pytime_object_to_timeval", test_pytime_object_to_timeval,  METH_VARARGS},
     {"pytime_object_to_timespec", test_pytime_object_to_timespec,  METH_VARARGS},
+#ifdef WITH_THREAD
     {"call_in_temporary_c_thread", call_in_temporary_c_thread, METH_O,
      PyDoc_STR("set_error_class(error_class) -> None")},
+#endif
     {NULL, NULL} /* sentinel */
 };
 

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list