Skip to content

Commit

Permalink
Add back PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT
Browse files Browse the repository at this point in the history
This define was
* introduced with #5286
* removed with #5531

It is has been in use here:
* https://github.com/pybind/pybind11_protobuf/blob/f02a2b7653bc50eb5119d125842a3870db95d251/pybind11_protobuf/native_proto_caster.h#L89-L101

Currently pybind11 unit tests for the two holder caster backwards compatibility traits

* `copyable_holder_caster_shared_ptr_with_smart_holder_support_enabled`
* `move_only_holder_caster_unique_ptr_with_smart_holder_support_enabled`

are missing.
  • Loading branch information
rwgk committed Mar 1, 2025
1 parent d3f9f93 commit 4b05643
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions include/pybind11/detail/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,9 @@ struct internals {
}
};

// For backwards compatibility (i.e. #ifdef guards):
#define PYBIND11_HAS_INTERNALS_WITH_SMART_HOLDER_SUPPORT

enum class holder_enum_t : uint8_t {
undefined,
std_unique_ptr, // Default, lacking interop with std::shared_ptr.
Expand Down

0 comments on commit 4b05643

Please sign in to comment.