Skip to content

Commit

Permalink
Merge pull request #30156 from rwgk/functional_type_caster_rvpp
Browse files Browse the repository at this point in the history
pybind11/functional.h: use `PYBIND11_TYPE_CASTER_RVPP`
  • Loading branch information
Ralf W. Grosse-Kunstleve authored Aug 29, 2024
2 parents 0bf3e8e + f31d28a commit 326741b
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions include/pybind11/functional.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,11 +134,11 @@ struct type_caster<std::function<Return(Args...)>> {
return cpp_function(std::forward<Func>(f_), rvpp).release();
}

PYBIND11_TYPE_CASTER(type,
const_name("Callable[[")
+ ::pybind11::detail::concat(make_caster<Args>::name...)
+ const_name("], ") + make_caster<retval_type>::name
+ const_name("]"));
PYBIND11_TYPE_CASTER_RVPP(type,
const_name("Callable[[")
+ ::pybind11::detail::concat(make_caster<Args>::name...)
+ const_name("], ") + make_caster<retval_type>::name
+ const_name("]"));
};

PYBIND11_NAMESPACE_END(detail)
Expand Down

0 comments on commit 326741b

Please sign in to comment.