From: Benjamin Peterson Date: Mon, 16 Jan 2017 07:57:56 +0000 (-0800) Subject: fix _testcapi to work when statically linked into python X-Git-Tag: v2.7.14rc1~299 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=888a29fedb30512115bd50e87aefb2adc79bc3b0;p=thirdparty%2FPython%2Fcpython.git fix _testcapi to work when statically linked into python --- diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c index 69f59fcda928..f306b1c65402 100644 --- a/Modules/_testcapimodule.c +++ b/Modules/_testcapimodule.c @@ -1824,7 +1824,7 @@ set_errno(PyObject *self, PyObject *args) Py_RETURN_NONE; } -#ifdef Py_USING_UNICODE +#if defined(Py_USING_UNICODE) && !defined(Py_BUILD_CORE) static int test_run_counter = 0; static PyObject * @@ -2486,7 +2486,7 @@ static PyMethodDef TestMethods[] = { {"raise_exception", raise_exception, METH_VARARGS}, {"set_errno", set_errno, METH_VARARGS}, {"test_config", (PyCFunction)test_config, METH_NOARGS}, -#ifdef Py_USING_UNICODE +#if defined(Py_USING_UNICODE) && !defined(Py_BUILD_CORE) {"test_datetime_capi", test_datetime_capi, METH_NOARGS}, #endif {"test_list_api", (PyCFunction)test_list_api, METH_NOARGS},