Skip to content

Commit c02d2cd

Browse files
committed
Restore smart_holder_poc.h as-is on smart_holder branch (i.e. undo PYBIND11_SMART_HOLDER_PADDING, which was meant for stress-testing only).
1 parent 58f9e18 commit c02d2cd

File tree

1 file changed

+0
-16
lines changed

1 file changed

+0
-16
lines changed

include/pybind11/detail/smart_holder_poc.h

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -138,31 +138,15 @@ inline bool is_std_default_delete(const std::type_info &rtti_deleter) {
138138
|| rtti_deleter == typeid(std::default_delete<T const>);
139139
}
140140

141-
// Meant to help detecting invalid `reinterpret_cast`s or similar.
142-
#ifdef PYBIND11_SMART_HOLDER_PADDING_ON
143-
# define PYBIND11_SMART_HOLDER_PADDING(N) int PADDING_##N##_[11]
144-
#else
145-
# define PYBIND11_SMART_HOLDER_PADDING(N)
146-
#endif
147-
148141
struct smart_holder {
149-
PYBIND11_SMART_HOLDER_PADDING(1);
150142
const std::type_info *rtti_uqp_del = nullptr;
151-
PYBIND11_SMART_HOLDER_PADDING(2);
152143
std::shared_ptr<void> vptr;
153-
PYBIND11_SMART_HOLDER_PADDING(3);
154144
bool vptr_is_using_noop_deleter : 1;
155-
PYBIND11_SMART_HOLDER_PADDING(4);
156145
bool vptr_is_using_builtin_delete : 1;
157-
PYBIND11_SMART_HOLDER_PADDING(5);
158146
bool vptr_is_external_shared_ptr : 1;
159-
PYBIND11_SMART_HOLDER_PADDING(6);
160147
bool is_populated : 1;
161-
PYBIND11_SMART_HOLDER_PADDING(7);
162148
bool is_disowned : 1;
163-
PYBIND11_SMART_HOLDER_PADDING(8);
164149
bool pointee_depends_on_holder_owner : 1; // SMART_HOLDER_WIP: See PR #2839.
165-
PYBIND11_SMART_HOLDER_PADDING(9);
166150

167151
// Design choice: smart_holder is movable but not copyable.
168152
smart_holder(smart_holder &&) = default;

0 commit comments

Comments
 (0)