| 967 | |
| 968 | template <typename F> |
| 969 | inline auto with_exception_translators(const F &cb) |
| 970 | -> decltype(cb(get_internals().registered_exception_translators, |
| 971 | get_local_internals().registered_exception_translators)) { |
| 972 | auto &internals = get_internals(); |
| 973 | #ifdef Py_GIL_DISABLED |
| 974 | pycritical_section lock((internals).exception_translator_mutex); |
| 975 | #endif |
| 976 | auto &local_internals = get_local_internals(); |
| 977 | return cb(internals.registered_exception_translators, |
| 978 | local_internals.registered_exception_translators); |
| 979 | } |
| 980 | |
| 981 | inline std::uint64_t mix64(std::uint64_t z) { |
| 982 | // David Stafford's variant 13 of the MurmurHash3 finalizer popularized |
no test coverage detected