Commit 61ec0d32 authored by Neal Norwitz's avatar Neal Norwitz

Fix some Py_ssize_t warnings on Win64 that were probably bugs

parent 56cdf686
...@@ -108,7 +108,7 @@ PyObject * ...@@ -108,7 +108,7 @@ PyObject *
PyBytes_FromStringAndSize(const char *bytes, Py_ssize_t size) PyBytes_FromStringAndSize(const char *bytes, Py_ssize_t size)
{ {
PyBytesObject *new; PyBytesObject *new;
int alloc; Py_ssize_t alloc;
assert(size >= 0); assert(size >= 0);
...@@ -1458,7 +1458,7 @@ return_self(PyBytesObject *self) ...@@ -1458,7 +1458,7 @@ return_self(PyBytesObject *self)
} }
Py_LOCAL_INLINE(Py_ssize_t) Py_LOCAL_INLINE(Py_ssize_t)
countchar(const char *target, int target_len, char c, Py_ssize_t maxcount) countchar(const char *target, Py_ssize_t target_len, char c, Py_ssize_t maxcount)
{ {
Py_ssize_t count=0; Py_ssize_t count=0;
const char *start=target; const char *start=target;
......
...@@ -78,7 +78,7 @@ memory_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds) ...@@ -78,7 +78,7 @@ memory_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
static void static void
_strided_copy_nd(char *dest, char *src, int nd, Py_ssize_t *shape, _strided_copy_nd(char *dest, char *src, int nd, Py_ssize_t *shape,
Py_ssize_t *strides, int itemsize, char fort) Py_ssize_t *strides, Py_ssize_t itemsize, char fort)
{ {
int k; int k;
Py_ssize_t outstride; Py_ssize_t outstride;
...@@ -298,7 +298,7 @@ memory_format_get(PyMemoryViewObject *self) ...@@ -298,7 +298,7 @@ memory_format_get(PyMemoryViewObject *self)
static PyObject * static PyObject *
memory_itemsize_get(PyMemoryViewObject *self) memory_itemsize_get(PyMemoryViewObject *self)
{ {
return PyInt_FromLong(self->view.itemsize); return PyInt_FromSsize_t(self->view.itemsize);
} }
static PyObject * static PyObject *
......
Markdown is supported
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