From: Benjamin Peterson Date: Sat, 30 Jan 2010 23:26:05 +0000 (+0000) Subject: move test outside WITH_THREAD section X-Git-Tag: v2.7a3~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a04ae012cede11d49d4df4551500cc0ba07b3dfb;p=thirdparty%2FPython%2Fcpython.git move test outside WITH_THREAD section --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 7aa57581d8a9..1d889ddb3237 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1144,8 +1144,6 @@ raise_exception(PyObject *self, PyObject *args) return NULL; } -#ifdef WITH_THREAD - static PyObject * test_datetime_capi(PyObject *self, PyObject *args) { if (PyDateTimeAPI) { @@ -1160,6 +1158,9 @@ test_datetime_capi(PyObject *self, PyObject *args) { return NULL; } + +#ifdef WITH_THREAD + /* test_thread_state spawns a thread of its own, and that thread releases * `thread_done` when it's finished. The driver code has to know when the * thread finishes, because the thread uses a PyObject (the callable) that