mirror of
https://github.com/pybind/pybind11.git
synced 2025-02-21 16:09:22 +00:00
Minor cleanup.
This commit is contained in:
parent
d390918d88
commit
e515940252
@ -860,7 +860,6 @@ protected:
|
||||
return result.release();
|
||||
}
|
||||
|
||||
// TODO: PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL...?
|
||||
Tuple<make_caster<Ts>...> subcasters;
|
||||
};
|
||||
|
||||
@ -1370,7 +1369,6 @@ tuple make_tuple() {
|
||||
|
||||
template <return_value_policy policy = return_value_policy::automatic_reference, typename... Args>
|
||||
tuple make_tuple(Args &&...args_) {
|
||||
// TODO: PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL...?
|
||||
constexpr size_t size = sizeof...(Args);
|
||||
std::array<object, size> args{{reinterpret_steal<object>(
|
||||
detail::make_caster<Args>::cast(std::forward<Args>(args_), policy, nullptr))...}};
|
||||
@ -1601,7 +1599,6 @@ private:
|
||||
return std::forward<Func>(f)(cast_op<Args>(std::move(std::get<Is>(argcasters)))...);
|
||||
}
|
||||
|
||||
// TODO: PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL...?
|
||||
std::tuple<make_caster<Args>...> argcasters;
|
||||
};
|
||||
|
||||
|
@ -214,7 +214,7 @@ protected:
|
||||
/* Type casters for the function arguments and return value */
|
||||
using cast_in = argument_loader<Args...>;
|
||||
using make_caster_type_out = conditional_t<std::is_void<Return>::value, void_type, Return>;
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(make_caster_type_out);
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(make_caster_type_out)
|
||||
using cast_out = make_caster<make_caster_type_out>;
|
||||
|
||||
static_assert(
|
||||
@ -1855,7 +1855,7 @@ public:
|
||||
auto *ptr = new capture{std::forward<Func>(func)};
|
||||
install_buffer_funcs(
|
||||
[](PyObject *obj, void *ptr) -> buffer_info * {
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(type);
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(type)
|
||||
detail::make_caster<type> caster;
|
||||
if (!caster.load(obj, false)) {
|
||||
return nullptr;
|
||||
@ -2717,7 +2717,7 @@ void implicitly_convertible() {
|
||||
return nullptr;
|
||||
}
|
||||
set_flag flag_helper(currently_used);
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(InputType);
|
||||
PYBIND11_DETAIL_TYPE_CASTER_ACCESS_TRANSLATION_UNIT_LOCAL(InputType)
|
||||
if (!detail::make_caster<InputType>().load(obj, false)) {
|
||||
return nullptr;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user