aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/initconfig.c
diff options
context:
space:
mode:
Diffstat (limited to 'Python/initconfig.c')
-rw-r--r--Python/initconfig.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/Python/initconfig.c b/Python/initconfig.c
index e5b87878918..62f1f67473d 100644
--- a/Python/initconfig.c
+++ b/Python/initconfig.c
@@ -201,6 +201,8 @@ int Py_LegacyWindowsStdioFlag = 0; /* Uses FileIO instead of WindowsConsoleIO */
static PyObject *
_Py_GetGlobalVariablesAsDict(void)
{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
PyObject *dict, *obj;
dict = PyDict_New();
@@ -267,15 +269,19 @@ fail:
#undef SET_ITEM
#undef SET_ITEM_INT
#undef SET_ITEM_STR
+_Py_COMP_DIAG_POP
}
char*
Py_GETENV(const char *name)
{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
if (Py_IgnoreEnvironmentFlag) {
return NULL;
}
return getenv(name);
+_Py_COMP_DIAG_POP
}
/* --- PyStatus ----------------------------------------------- */
@@ -1443,6 +1449,8 @@ config_get_env_dup(PyConfig *config,
static void
config_get_global_vars(PyConfig *config)
{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
if (config->_config_init != _PyConfig_INIT_COMPAT) {
/* Python and Isolated configuration ignore global variables */
return;
@@ -1478,6 +1486,7 @@ config_get_global_vars(PyConfig *config)
#undef COPY_FLAG
#undef COPY_NOT_FLAG
+_Py_COMP_DIAG_POP
}
@@ -1485,6 +1494,8 @@ config_get_global_vars(PyConfig *config)
static void
config_set_global_vars(const PyConfig *config)
{
+_Py_COMP_DIAG_PUSH
+_Py_COMP_DIAG_IGNORE_DEPR_DECLS
#define COPY_FLAG(ATTR, VAR) \
if (config->ATTR != -1) { \
VAR = config->ATTR; \
@@ -1519,6 +1530,7 @@ config_set_global_vars(const PyConfig *config)
#undef COPY_FLAG
#undef COPY_NOT_FLAG
+_Py_COMP_DIAG_POP
}