summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2018-11-14 16:39:45 (GMT)
committerGitHub <noreply@github.com>2018-11-14 16:39:45 (GMT)
commit01de89cb59107d4f889aa503a1c0350dae4aebaf (patch)
tree1b0a002a18efdc053caed59e3c5805570f891449 /Include
parent64313478bcbd0a708c3ce5d4d14f977da56e4be9 (diff)
downloadcpython-01de89cb59107d4f889aa503a1c0350dae4aebaf.zip
cpython-01de89cb59107d4f889aa503a1c0350dae4aebaf.tar.gz
cpython-01de89cb59107d4f889aa503a1c0350dae4aebaf.tar.bz2
bpo-35233: InitConfigTests tests more config vars (GH-10541)
test_embed.InitConfigTests tests more configuration variables. Changes: * InitConfigTests tests more core configuration variables: * base_exec_prefix * base_prefix * exec_prefix * home * legacy_windows_fs_encoding * legacy_windows_stdio * module_search_path_env * prefix * "_testembed init_from_config" tests more variables: * argv * warnoptions * xoptions * InitConfigTests: add check_global_config(), check_core_config() and check_main_config() subfunctions to cleanup the code. Move also constants at the class level (ex: COPY_MAIN_CONFIG). * Fix _PyCoreConfig_AsDict(): don't set stdio_encoding twice * Use more macros in _PyCoreConfig_AsDict() and _PyMainInterpreterConfig_AsDict() to reduce code duplication. * Other minor cleanups.
Diffstat (limited to 'Include')
-rw-r--r--Include/coreconfig.h4
-rw-r--r--Include/pylifecycle.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/Include/coreconfig.h b/Include/coreconfig.h
index f71a364..0ed3222 100644
--- a/Include/coreconfig.h
+++ b/Include/coreconfig.h
@@ -359,9 +359,9 @@ PyAPI_FUNC(int) _PyCoreConfig_GetEnvDup(
wchar_t *wname,
char *name);
-/* Used by _testcapi.get_coreconfig() */
-PyAPI_FUNC(PyObject *) _PyCoreConfig_AsDict(const _PyCoreConfig *config);
+/* Used by _testcapi.get_global_config() and _testcapi.get_core_config() */
PyAPI_FUNC(PyObject *) _Py_GetGlobalVariablesAsDict(void);
+PyAPI_FUNC(PyObject *) _PyCoreConfig_AsDict(const _PyCoreConfig *config);
#endif
#ifdef __cplusplus
diff --git a/Include/pylifecycle.h b/Include/pylifecycle.h
index 3d9365d..7d383aa 100644
--- a/Include/pylifecycle.h
+++ b/Include/pylifecycle.h
@@ -37,6 +37,7 @@ PyAPI_FUNC(void) _PyMainInterpreterConfig_Clear(_PyMainInterpreterConfig *);
PyAPI_FUNC(int) _PyMainInterpreterConfig_Copy(
_PyMainInterpreterConfig *config,
const _PyMainInterpreterConfig *config2);
+/* Used by _testcapi.get_main_config() */
PyAPI_FUNC(PyObject*) _PyMainInterpreterConfig_AsDict(
const _PyMainInterpreterConfig *config);