From 60e935098ed1a392fd8495d5a6a658c00ed62f0b Mon Sep 17 00:00:00 2001 From: "Ralf W. Grosse-Kunstleve" Date: Sun, 4 Aug 2024 10:00:15 -0700 Subject: [PATCH] Track smart_holder PR #5286: Fix `HAVE` vs `HAS` naming mishap (`PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT`) https://github.com/pybind/pybind11/pull/5286 Systematic, trivial name change: ```diff -PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT +PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT ``` This is for internal consistency. There are no `PYBIND11_HAVE` macros, but 10 unique `PYBIND11_HAS` macros: ``` $ git grep 'define PYBIND11_HAS' | sed 's/.*define PYBIND11_HAS/PYBIND11_HAS/' | cut -d' ' -f1 | sort | uniq ``` ``` PYBIND11_HAS_EXPERIMENTAL_FILESYSTEM PYBIND11_HAS_EXP_OPTIONAL PYBIND11_HAS_FILESYSTEM PYBIND11_HAS_FILESYSTEM_IS_OPTIONAL PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT PYBIND11_HAS_OPTIONAL PYBIND11_HAS_STD_LAUNDER PYBIND11_HAS_STRING_VIEW PYBIND11_HAS_U8STRING PYBIND11_HAS_VARIANT ``` PiperOrigin-RevId: 659316612 --- pybind11_protobuf/native_proto_caster.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pybind11_protobuf/native_proto_caster.h b/pybind11_protobuf/native_proto_caster.h index cf87a83..6d020e0 100644 --- a/pybind11_protobuf/native_proto_caster.h +++ b/pybind11_protobuf/native_proto_caster.h @@ -91,7 +91,7 @@ struct type_caster< : public pybind11_protobuf::proto_caster< ProtoType, pybind11_protobuf::native_cast_impl> {}; -#if defined(PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT) +#if defined(PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT) template struct copyable_holder_caster_shared_ptr_with_smart_holder_support_enabled< @@ -103,7 +103,7 @@ struct move_only_holder_caster_unique_ptr_with_smart_holder_support_enabled< ProtoType, enable_if_t::value>> : std::false_type {}; -#endif // PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT +#endif // PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT // NOTE: If smart_holders becomes the default we will need to change this to // type_caster, ...