mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-26 23:22:01 +00:00
Add missing handle_type_name<module_>
.
Discovered via manual inspection by @sizmailov: https://github.com/pybind/pybind11/pull/4888#issuecomment-1774023960 NOTE: This is actually a bug fix, in its own right.
This commit is contained in:
parent
3c20944355
commit
74817b7f9f
@ -1318,6 +1318,15 @@ public:
|
||||
}
|
||||
};
|
||||
|
||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||
|
||||
template <>
|
||||
struct handle_type_name<module_> {
|
||||
static constexpr auto name = const_name("module");
|
||||
};
|
||||
|
||||
PYBIND11_NAMESPACE_END(detail)
|
||||
|
||||
// When inside a namespace (or anywhere as long as it's not the first item on a line),
|
||||
// C++20 allows "module" to be used. This is provided for backward compatibility, and for
|
||||
// simplicity, if someone wants to use py::module for example, that is perfectly safe.
|
||||
|
Loading…
Reference in New Issue
Block a user