|
39 | 39 | /// further ABI-incompatible changes may be made before the ABI is officially
|
40 | 40 | /// changed to the new version.
|
41 | 41 | #ifndef PYBIND11_INTERNALS_VERSION
|
42 |
| -# if PY_VERSION_HEX >= 0x030E0000 |
43 |
| -// Get test coverage for ABI version 12 without breaking existing |
44 |
| -// Python versions. |
45 |
| -# define PYBIND11_INTERNALS_VERSION 12 |
46 |
| -# else |
47 |
| -# define PYBIND11_INTERNALS_VERSION 11 |
48 |
| -# endif |
| 42 | +# define PYBIND11_INTERNALS_VERSION 11 |
49 | 43 | #endif
|
50 | 44 |
|
51 | 45 | #if PYBIND11_INTERNALS_VERSION < 11
|
@@ -182,10 +176,10 @@ struct type_equal_to {
|
182 | 176 | };
|
183 | 177 | #endif
|
184 | 178 |
|
| 179 | +// For now, we don't bother adding a fancy hash for pointers and just |
| 180 | +// let the standard library use the identity hash function if that's |
| 181 | +// what it wants to do (e.g., as in libstdc++). |
185 | 182 | template <typename value_type>
|
186 |
| -// REVIEW: do we need to add a fancy hash for pointers or is the |
187 |
| -// possible identity hash function from the standard library (e.g., |
188 |
| -// libstdc++) sufficient? |
189 | 183 | using fast_type_map = std::unordered_map<const std::type_info *, value_type>;
|
190 | 184 |
|
191 | 185 | template <typename value_type>
|
@@ -249,10 +243,11 @@ struct internals {
|
249 | 243 | pymutex exception_translator_mutex;
|
250 | 244 | #endif
|
251 | 245 | #if PYBIND11_INTERNALS_VERSION >= 12
|
252 |
| - // non-normative but fast "hint" for |
253 |
| - // registered_types_cpp. Successful lookups are correct; |
254 |
| - // unsuccessful lookups need to try registered_types_cpp and then |
255 |
| - // backfill this map if they find anything. |
| 246 | + // non-normative but fast "hint" for registered_types_cpp. Meant |
| 247 | + // to be used as the first level of a two-level lookup: successful |
| 248 | + // lookups are correct, but unsuccessful lookups need to try |
| 249 | + // registered_types_cpp and then backfill this map if they find |
| 250 | + // anything. |
256 | 251 | fast_type_map<type_info *> registered_types_cpp_fast;
|
257 | 252 | #endif
|
258 | 253 |
|
|
0 commit comments