mirror of
https://github.com/pybind/pybind11.git
synced 2025-03-25 18:07:43 +00:00
Updated py::capsule type hint to use new types.CapsuleType (#5567)
This commit is contained in:
parent
dfe7e65b45
commit
9f08625d60
@ -305,7 +305,7 @@ public:
|
||||
template <typename T>
|
||||
using cast_op_type = void *&;
|
||||
explicit operator void *&() { return value; }
|
||||
static constexpr auto name = const_name("capsule");
|
||||
static constexpr auto name = const_name("types.CapsuleType");
|
||||
|
||||
private:
|
||||
void *value = nullptr;
|
||||
@ -1281,7 +1281,7 @@ struct handle_type_name<type> {
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<capsule> {
|
||||
static constexpr auto name = const_name("capsule");
|
||||
static constexpr auto name = const_name("types.CapsuleType");
|
||||
};
|
||||
template <>
|
||||
struct handle_type_name<ellipsis> {
|
||||
|
@ -41,7 +41,7 @@ def test_pointers(msg):
|
||||
msg(excinfo.value)
|
||||
== """
|
||||
get_void_ptr_value(): incompatible function arguments. The following argument types are supported:
|
||||
1. (arg0: capsule) -> int
|
||||
1. (arg0: types.CapsuleType) -> int
|
||||
|
||||
Invoked with: [1, 2, 3]
|
||||
"""
|
||||
|
Loading…
Reference in New Issue
Block a user