Skip to content

Commit 60e9350

Browse files
rwgkcopybara-github
authored andcommitted
Track smart_holder PR #5286: Fix HAVE vs HAS naming mishap (PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT)
pybind/pybind11#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
1 parent 51fc4ab commit 60e9350

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pybind11_protobuf/native_proto_caster.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ struct type_caster<
9191
: public pybind11_protobuf::proto_caster<
9292
ProtoType, pybind11_protobuf::native_cast_impl> {};
9393

94-
#if defined(PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT)
94+
#if defined(PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT)
9595

9696
template <typename ProtoType>
9797
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<
103103
ProtoType, enable_if_t<std::is_base_of<::google::protobuf::Message, ProtoType>::value>>
104104
: std::false_type {};
105105

106-
#endif // PYBIND11_HAVE_INTERNALS_WITH_SMART_HOLDER_SUPPORT
106+
#endif // PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT
107107

108108
// NOTE: If smart_holders becomes the default we will need to change this to
109109
// type_caster<std::unique_ptr<ProtoType, D>, ...

0 commit comments

Comments
 (0)