mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
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:
parent
f1b9ad3d38
commit
5ed6995675
4 changed files with 164 additions and 149 deletions
|
|
@ -358,10 +358,11 @@ PyAPI_FUNC(int) _PyCoreConfig_GetEnvDup(
|
|||
wchar_t **dest,
|
||||
wchar_t *wname,
|
||||
char *name);
|
||||
|
||||
/* Used by _testcapi.get_coreconfig() */
|
||||
PyAPI_FUNC(PyObject *) _PyCoreConfig_AsDict(const _PyCoreConfig *config);
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue