|
12 | 12 | #define PYBIND11_PLATFORM_ABI_ID_STRINGIFY(x) #x
|
13 | 13 | #define PYBIND11_PLATFORM_ABI_ID_TOSTRING(x) PYBIND11_PLATFORM_ABI_ID_STRINGIFY(x)
|
14 | 14 |
|
15 |
| -// Let's assume that different compilers are ABI-incompatible. |
16 |
| -// A user can manually set this string if they know their |
17 |
| -// compiler is compatible. |
18 |
| -#ifndef PYBIND11_COMPILER_TYPE |
| 15 | +#ifdef PYBIND11_COMPILER_TYPE |
| 16 | +// // To maintain backward compatibility (see PR #5439). |
| 17 | +# define PYBIND11_COMPILER_TYPE_LEADING_UNDERSCORE "" |
| 18 | +#else |
| 19 | +# define PYBIND11_COMPILER_TYPE_LEADING_UNDERSCORE "_" |
19 | 20 | # if defined(__MINGW32__)
|
20 |
| -# define PYBIND11_COMPILER_TYPE "_mingw" |
| 21 | +# define PYBIND11_COMPILER_TYPE "mingw" |
21 | 22 | # elif defined(__CYGWIN__)
|
22 |
| -# define PYBIND11_COMPILER_TYPE "_gcc_cygwin" |
| 23 | +# define PYBIND11_COMPILER_TYPE "gcc_cygwin" |
23 | 24 | # elif defined(_MSC_VER)
|
24 |
| -# define PYBIND11_COMPILER_TYPE "_msvc" |
| 25 | +# define PYBIND11_COMPILER_TYPE "msvc" |
25 | 26 | # elif defined(__INTEL_COMPILER) || defined(__clang__) || defined(__GNUC__)
|
26 |
| -# define PYBIND11_COMPILER_TYPE "_system" // Assumed compatible with system compiler. |
| 27 | +# define PYBIND11_COMPILER_TYPE "system" // Assumed compatible with system compiler. |
27 | 28 | # else
|
28 | 29 | # error "Unknown PYBIND11_COMPILER_TYPE: PLEASE REVISE THIS CODE."
|
29 | 30 | # endif
|
|
82 | 83 | # define PYBIND11_BUILD_TYPE ""
|
83 | 84 | #endif
|
84 | 85 |
|
85 |
| -// Obsolete and slated for removal. DO NOT USE! |
86 |
| -#ifndef PYBIND11_INTERNALS_KIND |
87 |
| -# define PYBIND11_INTERNALS_KIND "" |
88 |
| -#endif |
89 |
| - |
90 | 86 | #define PYBIND11_PLATFORM_ABI_ID \
|
91 |
| - PYBIND11_INTERNALS_KIND PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI \ |
92 |
| - PYBIND11_BUILD_TYPE |
| 87 | + PYBIND11_COMPILER_TYPE PYBIND11_STDLIB PYBIND11_BUILD_ABI PYBIND11_BUILD_TYPE |
0 commit comments