diff Python/import.c @ 18808:a8b1acc7a21f legacy-trunk

Add -E command line switch (ignore environment variables like PYTHONHOME and PYTHONPATH).
author Neil Schemenauer <nascheme@enme.ucalgary.ca>
date Mon, 23 Jul 2001 16:30:27 +0000
parents 763bb6fae280
children 09df3254b49d
line wrap: on
line diff
--- a/Python/import.c	Mon Jul 23 16:30:21 2001 +0000
+++ b/Python/import.c	Mon Jul 23 16:30:27 2001 +0000
@@ -1069,7 +1069,7 @@
 	char tempbuf[MAX_PATH];
 #endif
 
-	if (getenv("PYTHONCASEOK") != NULL)
+	if (Py_GETENV("PYTHONCASEOK") != NULL)
 		return 1;
 
 #ifdef __CYGWIN__
@@ -1092,7 +1092,7 @@
 	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 @@
 	FSSpec fss;
 	OSErr err;
 
-	if (getenv("PYTHONCASEOK") != NULL)
+	if (Py_GETENV("PYTHONCASEOK") != NULL)
 		return 1;
 
 #ifndef USE_GUSI1
@@ -1147,7 +1147,7 @@
 	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 */