PYBIND11_NAMESPACE consistency fixes. (#4043)

This commit is contained in:
Ralf W. Grosse-Kunstleve 2022-07-06 14:29:20 -07:00 committed by GitHub
parent 0ab1fcfb1c
commit cd08869df1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 5 deletions

View File

@ -846,7 +846,7 @@ struct always_construct_holder {
/// Create a specialization for custom holder types (silently ignores std::shared_ptr)
#define PYBIND11_DECLARE_HOLDER_TYPE(type, holder_type, ...) \
namespace pybind11 { \
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) \
namespace detail { \
template <typename type> \
struct always_construct_holder<holder_type> : always_construct_holder<void, ##__VA_ARGS__> { \
@ -855,7 +855,7 @@ struct always_construct_holder {
class type_caster<holder_type, enable_if_t<!is_shared_ptr<holder_type>::value>> \
: public type_caster_holder<type, holder_type> {}; \
} \
}
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
// PYBIND11_DECLARE_HOLDER_TYPE holder types:
template <typename base, typename holder>
@ -1650,12 +1650,12 @@ handle type::handle_of() {
}
#define PYBIND11_MAKE_OPAQUE(...) \
namespace pybind11 { \
PYBIND11_NAMESPACE_BEGIN(PYBIND11_NAMESPACE) \
namespace detail { \
template <> \
class type_caster<__VA_ARGS__> : public type_caster_base<__VA_ARGS__> {}; \
} \
}
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)
/// Lets you pass a type containing a `,` through a macro parameter without needing a separate
/// typedef, e.g.:

View File

@ -425,4 +425,4 @@ struct pickle_factory<Get, Set, RetState(Self), NewInstance(ArgState)> {
PYBIND11_NAMESPACE_END(initimpl)
PYBIND11_NAMESPACE_END(detail)
PYBIND11_NAMESPACE_END(pybind11)
PYBIND11_NAMESPACE_END(PYBIND11_NAMESPACE)