Skip to content

Commit b065acc

Browse files
committed
[C++] Remove warning in the offset computation
1 parent 113671d commit b065acc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/memory.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ namespace boost { namespace python { namespace objects { \
7777
Holder* holder = Derived::construct(&instance->storage, (PyObject*)instance, x); \
7878
holder->install(raw_result); \
7979
\
80-
size_t holder_offset = reinterpret_cast<size_t>(holder) \
81-
- reinterpret_cast<size_t>(&instance->storage) \
80+
Py_ssize_t holder_offset = reinterpret_cast<Py_ssize_t>(holder) \
81+
- reinterpret_cast<Py_ssize_t>(&instance->storage) \
8282
+ offsetof(instance_t, storage); \
8383
Py_SIZE(instance) = holder_offset; \
8484
\

0 commit comments

Comments
 (0)