Skip to content

Commit d5c4386

Browse files
committed
fixup! Replace global map holders_seen with local holder_type in registered type_info
Improve wording and variable name: - seen_holder_name -> holder_name - seen holder -> declared holder
1 parent cde5c11 commit d5c4386

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

include/pybind11/cast.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1505,11 +1505,11 @@ void check_for_holder_mismatch_impl() {
15051505
#ifdef NDEBUG
15061506
pybind11_fail("Mismatched holders detected (compile in debug mode for details)");
15071507
#else
1508-
std::string seen_holder_name(base_info->holder_type->name());
1509-
detail::clean_type_id(seen_holder_name);
1508+
std::string holder_name(base_info->holder_type->name());
1509+
detail::clean_type_id(holder_name);
15101510
pybind11_fail("Mismatched holders detected: "
15111511
" attempting to use holder type " + type_id<iholder>() + ", but " + type_id<base_type>() +
1512-
" was already seen using holder type " + seen_holder_name);
1512+
" was declared using holder type " + holder_name);
15131513
#endif
15141514
}
15151515
}

0 commit comments

Comments
 (0)