Add missing handle_type_name<> specializations for bytearray, memoryview, type.

Discovered via manual inspection by @sizmailov:

https://github.com/pybind/pybind11/pull/4888#issuecomment-1774023960
This commit is contained in:
Ralf W. Grosse-Kunstleve 2023-10-22 07:57:11 -07:00
parent 63a48815fc
commit 3c20944355

View File

@ -952,10 +952,22 @@ struct handle_type_name<sequence> {
static constexpr auto name = const_name("Sequence");
};
template <>
struct handle_type_name<bytearray> {
static constexpr auto name = const_name("bytearray");
};
template <>
struct handle_type_name<memoryview> {
static constexpr auto name = const_name("memoryview");
};
template <>
struct handle_type_name<slice> {
static constexpr auto name = const_name("slice");
};
template <>
struct handle_type_name<type> {
static constexpr auto name = const_name("type");
};
template <>
struct handle_type_name<args> {
static constexpr auto name = const_name("*args");
};