mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	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"
This commit is contained in:
		
							parent
							
								
									548cb6060a
								
							
						
					
					
						commit
						f78a5e9ce8
					
				
					 4 changed files with 34 additions and 32 deletions
				
			
		|  | @ -655,7 +655,7 @@ pymain_run_file(_PyCoreConfig *config, PyCompilerFlags *cf) | |||
| static void | ||||
| pymain_run_startup(_PyCoreConfig *config, PyCompilerFlags *cf) | ||||
| { | ||||
|     const char *startup = _PyCoreConfig_GetEnv(config, "PYTHONSTARTUP"); | ||||
|     const char *startup = _Py_GetEnv(config->preconfig.use_environment, "PYTHONSTARTUP"); | ||||
|     if (startup == NULL) { | ||||
|         return; | ||||
|     } | ||||
|  | @ -735,7 +735,7 @@ pymain_repl(_PyCoreConfig *config, PyCompilerFlags *cf, int *exitcode) | |||
| { | ||||
|     /* Check this environment variable at the end, to give programs the
 | ||||
|        opportunity to set it from Python. */ | ||||
|     if (!Py_InspectFlag && _PyCoreConfig_GetEnv(config, "PYTHONINSPECT")) { | ||||
|     if (!Py_InspectFlag && _Py_GetEnv(config->preconfig.use_environment, "PYTHONINSPECT")) { | ||||
|         Py_InspectFlag = 1; | ||||
|         config->inspect = 1; | ||||
|     } | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Victor Stinner
						Victor Stinner