bpo-35081: Add _PyCoreConfig_AsDict() (GH-10362)

_testcapimodule.c must not include pycore_pathconfig.h, since it's an
internal header files.

Changes:

* Add _PyCoreConfig_AsDict() function to coreconfig.c.
* Remove pycore_pathconfig.h include from _testcapimodule.h.
* pycore_pathconfig.h now requires Py_BUILD_CORE to be defined.
* _testcapimodule.c compilation now fails if it's built with
  Py_BUILD_CORE defined.
This commit is contained in:
Victor Stinner 2018-11-06 15:59:52 +01:00 committed by GitHub
parent f1b9ad3d38
commit 5ed6995675
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 164 additions and 149 deletions

View file

@ -4,6 +4,10 @@
extern "C" {
#endif
#ifndef Py_BUILD_CORE
# error "Py_BUILD_CORE must be defined to include this header"
#endif
PyAPI_FUNC(void) _Py_wstrlist_clear(
int len,
wchar_t **list);