mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-24 23:07:00 +00:00
Bug fixes: Add missing handle_type_name specializations. (#5073)
* Transfer bug fixes from #4888 wholesale. Full test coverage for all fixes is still missing. * Add cmake option(PYBIND11_DISABLE_HANDLE_TYPE_NAME_DEFAULT_IMPLEMENTATION) and use in some tests.
This commit is contained in:
committed by
GitHub
parent
705efccecd
commit
0efff79f01
@@ -46,10 +46,16 @@ PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE)
|
||||
|
||||
PYBIND11_WARNING_DISABLE_MSVC(4127)
|
||||
|
||||
class dtype; // Forward declaration
|
||||
class array; // Forward declaration
|
||||
|
||||
PYBIND11_NAMESPACE_BEGIN(detail)
|
||||
|
||||
template <>
|
||||
struct handle_type_name<dtype> {
|
||||
static constexpr auto name = const_name("numpy.dtype");
|
||||
};
|
||||
|
||||
template <>
|
||||
struct handle_type_name<array> {
|
||||
static constexpr auto name = const_name("numpy.ndarray");
|
||||
|
||||
Reference in New Issue
Block a user