@@ -155,13 +155,7 @@ struct type_info {
155
155
};
156
156
157
157
// / Tracks the `internals` and `type_info` ABI version independent of the main library version
158
- #ifndef PYBIND11_USE_SMART_HOLDER_AS_DEFAULT
159
158
#define PYBIND11_INTERNALS_VERSION 4
160
- #else
161
- // See README_smart_holder.rst:
162
- // Classic / Conservative / Progressive cross-module compatibility
163
- #define PYBIND11_INTERNALS_VERSION 1004
164
- #endif
165
159
166
160
// / On MSVC, debug and release builds are not ABI-compatible!
167
161
#if defined(_MSC_VER) && defined(_DEBUG)
@@ -221,11 +215,21 @@ struct type_info {
221
215
# endif
222
216
#endif
223
217
218
+ // / See README_smart_holder.rst:
219
+ // / Classic / Conservative / Progressive cross-module compatibility
220
+ #ifndef PYBIND11_INTERNALS_SH_DEF
221
+ # if defined(PYBIND11_USE_SMART_HOLDER_AS_DEFAULT)
222
+ # define PYBIND11_INTERNALS_SH_DEF " "
223
+ # else
224
+ # define PYBIND11_INTERNALS_SH_DEF " _sh_def"
225
+ # endif
226
+ #endif
227
+
224
228
#define PYBIND11_INTERNALS_ID " __pybind11_internals_v" \
225
- PYBIND11_TOSTRING (PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE "__"
229
+ PYBIND11_TOSTRING (PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE PYBIND11_INTERNALS_SH_DEF "__"
226
230
227
231
#define PYBIND11_MODULE_LOCAL_ID " __pybind11_module_local_v" \
228
- PYBIND11_TOSTRING (PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE "__"
232
+ PYBIND11_TOSTRING (PYBIND11_INTERNALS_VERSION) PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE PYBIND11_INTERNALS_SH_DEF "__"
229
233
230
234
// / Each module locally stores a pointer to the `internals` data. The data
231
235
// / itself is shared among modules with the same `PYBIND11_INTERNALS_ID`.
0 commit comments