Verified Commit 247181de authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

use Py_ssize_t everywhere

ssize_t is not guaranteed to be defined on non-POSIX platforms
parent a4768ec2
Pipeline #86863 passed with stages
in 12 minutes and 44 seconds
......@@ -459,7 +459,7 @@ T (*get_buffer_converter(Py_buffer *view))(const void *)
case 'Q':
return number_from_ptr<T, unsigned long long>;
case 'n':
return number_from_ptr<T, ssize_t>;
return number_from_ptr<T, Py_ssize_t>;
case 'N':
return number_from_ptr<T, size_t>;
case 'f':
......
......@@ -105,7 +105,7 @@ public:
}
}
ssize_t object_size() const;
Py_ssize_t object_size() const;
static bool check_exact(PyObject *candidate) {
return (Py_TYPE(candidate) == &pytype);
......@@ -160,7 +160,7 @@ int coerce_to_arrays(PyObject **a, PyObject **b, Dtype *coerced_dtype);
template <typename T> PyObject *transpose(PyObject *in, PyObject *dummy);
template <typename T>
ssize_t Array<T>::object_size() const
Py_ssize_t Array<T>::object_size() const
{
int ndim;
size_t *shape;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment