summaryrefslogtreecommitdiffstats
path: root/Python/import.c
diff options
context:
space:
mode:
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-07-23 16:30:27 (GMT)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>2001-07-23 16:30:27 (GMT)
commit7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5 (patch)
tree6b57c0d5016d8f919397303aaaa11cf610e1dd9d /Python/import.c
parentf973c6d5949bfed3e74b8b94c427c43df1e4b95c (diff)
downloadcpython-7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5.zip
cpython-7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5.tar.gz
cpython-7d4bb9f179f1888a472fd5d5a30df4ec3c55fea5.tar.bz2
Add -E command line switch (ignore environment variables like PYTHONHOME
and PYTHONPATH).
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/import.c b/Python/import.c
index 456a5be..82524f6 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -1069,7 +1069,7 @@ case_ok(char *buf, int len, int namelen, char *name)
char tempbuf[MAX_PATH];
#endif
- if (getenv("PYTHONCASEOK") != NULL)
+ if (Py_GETENV("PYTHONCASEOK") != NULL)
return 1;
#ifdef __CYGWIN__
@@ -1092,7 +1092,7 @@ case_ok(char *buf, int len, int namelen, char *name)
struct ffblk ffblk;
int done;
- if (getenv("PYTHONCASEOK") != NULL)
+ if (Py_GETENV("PYTHONCASEOK") != NULL)
return 1;
done = findfirst(buf, &ffblk, FA_ARCH|FA_RDONLY|FA_HIDDEN|FA_DIREC);
@@ -1109,7 +1109,7 @@ case_ok(char *buf, int len, int namelen, char *name)
FSSpec fss;
OSErr err;
- if (getenv("PYTHONCASEOK") != NULL)
+ if (Py_GETENV("PYTHONCASEOK") != NULL)
return 1;
#ifndef USE_GUSI1
@@ -1147,7 +1147,7 @@ case_ok(char *buf, int len, int namelen, char *name)
char dirname[MAXPATHLEN + 1];
const int dirlen = len - namelen - 1; /* don't want trailing SEP */
- if (getenv("PYTHONCASEOK") != NULL)
+ if (Py_GETENV("PYTHONCASEOK") != NULL)
return 1;
/* Copy the dir component into dirname; substitute "." if empty */