summaryrefslogtreecommitdiff
path: root/Modules
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2017-01-15 23:57:56 -0800
committerBenjamin Peterson <benjamin@python.org>2017-01-15 23:57:56 -0800
commit888a29fedb30512115bd50e87aefb2adc79bc3b0 (patch)
tree1311772c0e3a656b7da4ff8d8b5ec08e247124ca /Modules
parentea9342ae6dfd8e969f50999f0f60b9e33d3b05a4 (diff)
downloadcpython-git-888a29fedb30512115bd50e87aefb2adc79bc3b0.tar.gz
fix _testcapi to work when statically linked into python
Diffstat (limited to 'Modules')
-rw-r--r--Modules/_testcapimodule.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
index 69f59fcda9..f306b1c654 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},