@@ -65,7 +65,12 @@ typedef struct {
65
65
66
66
/* --- _PyPreConfig ----------------------------------------------- */
67
67
68
+ #define _Py_CONFIG_VERSION 1
69
+
68
70
typedef struct {
71
+ int _config_version ; /* Internal configuration version,
72
+ used for ABI compatibility */
73
+
69
74
/* If greater than 0, enable isolated mode: sys.path contains
70
75
neither the script's directory nor the user's site-packages directory.
71
76
@@ -132,6 +137,7 @@ typedef struct {
132
137
#define _PyPreConfig_INIT \
133
138
(_PyPreConfig){ \
134
139
_PyPreConfig_WINDOWS_INIT \
140
+ ._config_version = _Py_CONFIG_VERSION, \
135
141
.isolated = -1, \
136
142
.use_environment = -1, \
137
143
.dev_mode = -1, \
@@ -141,9 +147,12 @@ typedef struct {
141
147
/* --- _PyCoreConfig ---------------------------------------------- */
142
148
143
149
typedef struct {
144
- int isolated ;
145
- int use_environment ;
146
- int dev_mode ;
150
+ int _config_version ; /* Internal configuration version,
151
+ used for ABI compatibility */
152
+
153
+ int isolated ; /* Isolated mode? see _PyPreConfig.isolated */
154
+ int use_environment ; /* Use environment variables? see _PyPreConfig.use_environment */
155
+ int dev_mode ; /* Development mode? See _PyPreConfig.dev_mode */
147
156
148
157
/* Install signal handlers? Yes by default. */
149
158
int install_signal_handlers ;
@@ -397,6 +406,7 @@ typedef struct {
397
406
#define _PyCoreConfig_INIT \
398
407
(_PyCoreConfig){ \
399
408
_PyCoreConfig_WINDOWS_INIT \
409
+ ._config_version = _Py_CONFIG_VERSION, \
400
410
.isolated = -1, \
401
411
.use_environment = -1, \
402
412
.dev_mode = -1, \
0 commit comments