Skip to content

Commit 25d52ae

Browse files
b-passhenryiii
authored andcommitted
Comment tweak [skip ci]
1 parent 0b4988a commit 25d52ae

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

include/pybind11/detail/internals.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff 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.
7779
template <typename T>
7880
class thread_specific_storage {
7981
public:
@@ -571,14 +573,14 @@ class internals_pp_manager {
571573
std::unique_ptr<InternalsType> *internals_singleton_pp_;
572574
};
573575

574-
#if !defined(__GLIBCXX__)
575576
// If We loaded the internals through `state_dict`, our `error_already_set`
576577
// and `builtin_exception` may be different local classes than the ones set up in the
577578
// initial exception translator, below, so add another for our local exception classes.
578579
//
579580
// libstdc++ doesn't require this (types there are identified only by name)
580581
// libc++ with CPython doesn't require this (types are explicitly exported)
581582
// libc++ with PyPy still need it, awaiting further investigation
583+
#if !defined(__GLIBCXX__)
582584
inline void check_internals_local_exception_translator(internals *internals_ptr) {
583585
if (internals_ptr) {
584586
for (auto et : internals_ptr->registered_exception_translators) {

0 commit comments

Comments
 (0)