mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-12 17:26:13 +00:00
Remove superseded handle::operator() overloads
The variadic handle::operator() offers the same functionality as well as mixed positional, keyword, * and ** arguments. The tests are also superseded by the ones in `test_callbacks`.
This commit is contained in:
@@ -1134,20 +1134,6 @@ template <return_value_policy policy,
|
||||
return operator()<policy>(std::forward<Args>(args)...);
|
||||
}
|
||||
|
||||
inline object handle::operator()(detail::args_proxy args) const {
|
||||
object result(PyObject_CallObject(m_ptr, args.ptr()), false);
|
||||
if (!result)
|
||||
throw error_already_set();
|
||||
return result;
|
||||
}
|
||||
|
||||
inline object handle::operator()(detail::args_proxy args, detail::kwargs_proxy kwargs) const {
|
||||
object result(PyObject_Call(m_ptr, args.ptr(), kwargs.ptr()), false);
|
||||
if (!result)
|
||||
throw error_already_set();
|
||||
return result;
|
||||
}
|
||||
|
||||
template <typename... Args, typename /*SFINAE*/>
|
||||
dict::dict(Args &&...args)
|
||||
: dict(detail::unpacking_collector<>(std::forward<Args>(args)...).kwargs()) { }
|
||||
|
||||
@@ -48,8 +48,6 @@ public:
|
||||
object call(Args&&... args) const;
|
||||
template <return_value_policy policy = return_value_policy::automatic_reference, typename ... Args>
|
||||
object operator()(Args&&... args) const;
|
||||
inline object operator()(detail::args_proxy args) const;
|
||||
inline object operator()(detail::args_proxy f_args, detail::kwargs_proxy kwargs) const;
|
||||
operator bool() const { return m_ptr != nullptr; }
|
||||
bool operator==(const handle &h) const { return m_ptr == h.m_ptr; }
|
||||
bool operator!=(const handle &h) const { return m_ptr != h.m_ptr; }
|
||||
|
||||
Reference in New Issue
Block a user