diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-11-06 14:59:52 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-06 14:59:52 (GMT) |
commit | 5ed6995675b084fe583b71f96fdde4413bb2a77b (patch) | |
tree | 9fad4275372695bed69eb03f35cc49bceb8e3d0c /Include/coreconfig.h | |
parent | f1b9ad3d38c11676b45edcbf2369239bae436e56 (diff) | |
download | cpython-5ed6995675b084fe583b71f96fdde4413bb2a77b.zip cpython-5ed6995675b084fe583b71f96fdde4413bb2a77b.tar.gz cpython-5ed6995675b084fe583b71f96fdde4413bb2a77b.tar.bz2 |
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.
Diffstat (limited to 'Include/coreconfig.h')
-rw-r--r-- | Include/coreconfig.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h index ff7b684..a7d3983 100644 --- a/Include/coreconfig.h +++ b/Include/coreconfig.h @@ -358,9 +358,10 @@ PyAPI_FUNC(int) _PyCoreConfig_GetEnvDup( wchar_t **dest, wchar_t *wname, char *name); -#endif - +/* Used by _testcapi.get_coreconfig() */ +PyAPI_FUNC(PyObject *) _PyCoreConfig_AsDict(const _PyCoreConfig *config); +#endif #ifdef __cplusplus } |