Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Use boost::python::ssize_t instead of Py_ssize_t - it is available fo…
…r all PY_VERSION_HEX.
  • Loading branch information
JohannesWilde committed Dec 14, 2024
commit 4a0c0962bcac64a94f005a07ffee9861983feefa
2 changes: 1 addition & 1 deletion include/boost/python/numpy/dtype.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ class BOOST_NUMPY_DECL dtype : public object {
template <typename T> static dtype get_builtin();

/// @brief Return the size of the data type in bytes.
Py_ssize_t get_itemsize() const;
boost::python::ssize_t get_itemsize() const;

/**
* @brief Compare two dtypes for equivalence.
Expand Down
2 changes: 1 addition & 1 deletion src/numpy/dtype.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ python::detail::new_reference dtype::convert(object const & arg, bool align)
return python::detail::new_reference(reinterpret_cast<PyObject*>(obj));
}

Py_ssize_t dtype::get_itemsize() const {
boost::python::ssize_t dtype::get_itemsize() const {
#if NPY_ABI_VERSION < 0x02000000
return reinterpret_cast<PyArray_Descr*>(ptr())->elsize;
#else
Expand Down