[Python-checkins] cpython (2.7): fix _testcapi to work when statically linked into python

benjamin.peterson python-checkins at python.org
Mon Jan 16 02:58:02 EST 2017


https://hg.python.org/cpython/rev/a695ccbefff7
changeset:   106159:a695ccbefff7
branch:      2.7
parent:      106150:2c9b7d07a709
user:        Benjamin Peterson <benjamin at python.org>
date:        Sun Jan 15 23:57:56 2017 -0800
summary:
  fix _testcapi to work when statically linked into python

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


diff --git a/Modules/_testcapimodule.c b/Modules/_testcapimodule.c
--- a/Modules/_testcapimodule.c
+++ b/Modules/_testcapimodule.c
@@ -1824,7 +1824,7 @@
     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 @@
     {"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},

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


More information about the Python-checkins mailing list