summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-25 23:03:15 (GMT)
committerGitHub <noreply@github.com>2019-03-25 23:03:15 (GMT)
commitf78a5e9ce8f32a195f5f788aade79578437f30a6 (patch)
tree45dfc1faa3647b3f265a56f4e5956cbc5428626f /Include
parent548cb6060ab9d5a66931ea2be4da08c2c72c9176 (diff)
downloadcpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.zip
cpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.tar.gz
cpython-f78a5e9ce8f32a195f5f788aade79578437f30a6.tar.bz2
bpo-36301: Add _Py_GetEnv() function (GH-12542)
* Make _PyPreConfig_GetEnv(), _PyCoreConfig_GetEnv() and _PyCoreConfig_GetEnvDup() private * _Py_get_env_flag() first parameter becomes "int use_environment"
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_coreconfig.h16
1 files changed, 5 insertions, 11 deletions
diff --git a/Include/internal/pycore_coreconfig.h b/Include/internal/pycore_coreconfig.h
index 3c84010..829ff31 100644
--- a/Include/internal/pycore_coreconfig.h
+++ b/Include/internal/pycore_coreconfig.h
@@ -76,15 +76,17 @@ PyAPI_FUNC(int) _Py_str_to_int(
PyAPI_FUNC(const wchar_t*) _Py_get_xoption(
const _PyWstrList *xoptions,
const wchar_t *name);
+PyAPI_FUNC(const char*) _Py_GetEnv(
+ int use_environment,
+ const char *name);
PyAPI_FUNC(void) _PyPreConfig_Clear(_PyPreConfig *config);
PyAPI_FUNC(int) _PyPreConfig_Copy(_PyPreConfig *config,
const _PyPreConfig *config2);
PyAPI_FUNC(void) _PyPreConfig_GetGlobalConfig(_PyPreConfig *config);
PyAPI_FUNC(void) _PyPreConfig_SetGlobalConfig(const _PyPreConfig *config);
-PyAPI_FUNC(const char*) _PyPreConfig_GetEnv(const _PyPreConfig *config,
- const char *name);
-PyAPI_FUNC(void) _Py_get_env_flag(_PyPreConfig *config,
+PyAPI_FUNC(void) _Py_get_env_flag(
+ int use_environment,
int *flag,
const char *name);
PyAPI_FUNC(_PyInitError) _PyPreConfig_Read(_PyPreConfig *config,
@@ -107,14 +109,6 @@ PyAPI_FUNC(_PyInitError) _PyCoreConfig_SetPathConfig(
const _PyCoreConfig *config);
PyAPI_FUNC(void) _PyCoreConfig_GetGlobalConfig(_PyCoreConfig *config);
PyAPI_FUNC(void) _PyCoreConfig_SetGlobalConfig(const _PyCoreConfig *config);
-PyAPI_FUNC(const char*) _PyCoreConfig_GetEnv(
- const _PyCoreConfig *config,
- const char *name);
-PyAPI_FUNC(int) _PyCoreConfig_GetEnvDup(
- const _PyCoreConfig *config,
- wchar_t **dest,
- wchar_t *wname,
- char *name);
PyAPI_FUNC(_PyInitError) _PyCoreConfig_Read(_PyCoreConfig *config);
PyAPI_FUNC(_PyInitError) _PyCoreConfig_ReadFromArgv(_PyCoreConfig *config,
const _PyArgv *args);