summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
Diffstat (limited to 'Include')
-rw-r--r--Include/pydebug.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Include/pydebug.h b/Include/pydebug.h
index 0372401..94ea352 100644
--- a/Include/pydebug.h
+++ b/Include/pydebug.h
@@ -14,6 +14,12 @@ extern DL_IMPORT(int) Py_UseClassExceptionsFlag;
extern DL_IMPORT(int) Py_FrozenFlag;
extern DL_IMPORT(int) Py_TabcheckFlag;
extern DL_IMPORT(int) Py_UnicodeFlag;
+extern DL_IMPORT(int) Py_IgnoreEnvironmentFlag;
+
+/* this is a wrapper around getenv() the pays attention to
+ Py_IgnoreEnvironmentFlag. It should be used for getting variables like
+ PYTHONPATH and PYTHONHOME from the environment */
+#define Py_GETENV(s) (Py_IgnoreEnvironmentFlag ? NULL : getenv(s))
DL_IMPORT(void) Py_FatalError(char *message);