diff --git a/include/boost/python/numpy/dtype.hpp b/include/boost/python/numpy/dtype.hpp index 4673745e57..fd9f626bb9 100644 --- a/include/boost/python/numpy/dtype.hpp +++ b/include/boost/python/numpy/dtype.hpp @@ -47,7 +47,7 @@ class BOOST_NUMPY_DECL dtype : public object { template static dtype get_builtin(); /// @brief Return the size of the data type in bytes. - int get_itemsize() const; + Py_ssize_t get_itemsize() const; /** * @brief Compare two dtypes for equivalence. diff --git a/src/numpy/dtype.cpp b/src/numpy/dtype.cpp index 1ce8c6ec32..7e5b2416e0 100644 --- a/src/numpy/dtype.cpp +++ b/src/numpy/dtype.cpp @@ -98,7 +98,7 @@ python::detail::new_reference dtype::convert(object const & arg, bool align) return python::detail::new_reference(reinterpret_cast(obj)); } -int dtype::get_itemsize() const { +Py_ssize_t dtype::get_itemsize() const { #if NPY_ABI_VERSION < 0x02000000 return reinterpret_cast(ptr())->elsize; #else