summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-09-20 23:02:56 (GMT)
committerGitHub <noreply@github.com>2019-09-20 23:02:56 (GMT)
commitc422167749f92d4170203e996a2c619c818335ea (patch)
tree23cc4f024fefc0d5d708503fb5dbd6e07a509207 /Include
parentb1542583bee204130934c2b90684041e29378250 (diff)
downloadcpython-c422167749f92d4170203e996a2c619c818335ea.zip
cpython-c422167749f92d4170203e996a2c619c818335ea.tar.gz
cpython-c422167749f92d4170203e996a2c619c818335ea.tar.bz2
bpo-38234: Remove _PyPathConfig.dll_path (GH-16307)
The DLL path is not computed from any user configuration and cannot be configured by PyConfig. Instead, add a new _Py_dll_path global variable. Remove _PyConfig_SetPathConfig(): replaced with _PyPathConfig_Init(). Py_Initialize() now longer sets the "global path configuration", but only initialize _Py_dll_path.
Diffstat (limited to 'Include')
-rw-r--r--Include/internal/pycore_initconfig.h2
-rw-r--r--Include/internal/pycore_pathconfig.h10
2 files changed, 6 insertions, 6 deletions
diff --git a/Include/internal/pycore_initconfig.h b/Include/internal/pycore_initconfig.h
index c0b3d95..a7c1994 100644
--- a/Include/internal/pycore_initconfig.h
+++ b/Include/internal/pycore_initconfig.h
@@ -149,8 +149,6 @@ extern PyStatus _PyConfig_Copy(
PyConfig *config,
const PyConfig *config2);
extern PyStatus _PyConfig_InitPathConfig(PyConfig *config);
-extern PyStatus _PyConfig_SetPathConfig(
- const PyConfig *config);
extern void _PyConfig_Write(const PyConfig *config,
_PyRuntimeState *runtime);
extern PyStatus _PyConfig_SetPyArgv(
diff --git a/Include/internal/pycore_pathconfig.h b/Include/internal/pycore_pathconfig.h
index 9e0ba0b..a2c488c 100644
--- a/Include/internal/pycore_pathconfig.h
+++ b/Include/internal/pycore_pathconfig.h
@@ -13,10 +13,7 @@ typedef struct _PyPathConfig {
wchar_t *program_full_path;
wchar_t *prefix;
wchar_t *exec_prefix;
-#ifdef MS_WINDOWS
- wchar_t *dll_path;
-#endif
- /* Set by Py_SetPath(), or computed by _PyPathConfig_Init() */
+ /* Set by Py_SetPath(), or computed by _PyConfig_InitPathConfig() */
wchar_t *module_search_path;
/* Python program name */
wchar_t *program_name;
@@ -38,6 +35,9 @@ typedef struct _PyPathConfig {
/* Note: _PyPathConfig_INIT sets other fields to 0/NULL */
PyAPI_DATA(_PyPathConfig) _Py_path_config;
+#ifdef MS_WINDOWS
+PyAPI_DATA(wchar_t*) _Py_dll_path;
+#endif
extern void _PyPathConfig_ClearGlobal(void);
extern PyStatus _PyPathConfig_SetGlobal(
@@ -59,6 +59,8 @@ extern int _Py_FindEnvConfigValue(
extern wchar_t* _Py_GetDLLPath(void);
#endif
+extern PyStatus _PyPathConfig_Init(void);
+
#ifdef __cplusplus
}
#endif