Skip to content

Commit 888a29f

Browse files
committed
fix _testcapi to work when statically linked into python
1 parent ea9342a commit 888a29f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Modules/_testcapimodule.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1824,7 +1824,7 @@ set_errno(PyObject *self, PyObject *args)
18241824
Py_RETURN_NONE;
18251825
}
18261826

1827-
#ifdef Py_USING_UNICODE
1827+
#if defined(Py_USING_UNICODE) && !defined(Py_BUILD_CORE)
18281828
static int test_run_counter = 0;
18291829

18301830
static PyObject *
@@ -2486,7 +2486,7 @@ static PyMethodDef TestMethods[] = {
24862486
{"raise_exception", raise_exception, METH_VARARGS},
24872487
{"set_errno", set_errno, METH_VARARGS},
24882488
{"test_config", (PyCFunction)test_config, METH_NOARGS},
2489-
#ifdef Py_USING_UNICODE
2489+
#if defined(Py_USING_UNICODE) && !defined(Py_BUILD_CORE)
24902490
{"test_datetime_capi", test_datetime_capi, METH_NOARGS},
24912491
#endif
24922492
{"test_list_api", (PyCFunction)test_list_api, METH_NOARGS},

0 commit comments

Comments
 (0)