File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ using ExceptionTranslator = void (*)(std::exception_ptr);
7474#define PYBIND11_TLS_DELETE_VALUE (key ) PyThread_tss_set(&(key), nullptr )
7575#define PYBIND11_TLS_FREE (key ) PyThread_tss_delete(&(key))
7676
77+ // / A smart-pointer-like wrapper around a thread-specific value. get/set of the pointer applies to
78+ // / the current thread only.
7779template <typename T>
7880class thread_specific_storage {
7981public:
@@ -598,14 +600,14 @@ class internals_pp_manager {
598600 std::unique_ptr<InternalsType> *internals_singleton_pp_;
599601};
600602
601- #if !defined(__GLIBCXX__)
602603// If We loaded the internals through `state_dict`, our `error_already_set`
603604// and `builtin_exception` may be different local classes than the ones set up in the
604605// initial exception translator, below, so add another for our local exception classes.
605606//
606607// libstdc++ doesn't require this (types there are identified only by name)
607608// libc++ with CPython doesn't require this (types are explicitly exported)
608609// libc++ with PyPy still need it, awaiting further investigation
610+ #if !defined(__GLIBCXX__)
609611inline void check_internals_local_exception_translator (internals *internals_ptr) {
610612 if (internals_ptr) {
611613 for (auto et : internals_ptr->registered_exception_translators ) {
You can’t perform that action at this time.
0 commit comments