From bb4af3a417de1d2cfc5a0bb0f30f61d6787a244f Mon Sep 17 00:00:00 2001 From: Paul Brossier Date: Wed, 11 May 2016 14:37:49 +0200 Subject: [PATCH] python/ext/{aubioproxy,py-cvec}.c: use npy_intp, not long --- python/ext/aubioproxy.c | 6 +++--- python/ext/py-cvec.c | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/python/ext/aubioproxy.c b/python/ext/aubioproxy.c index aa10c0a0..3cc7f04d 100644 --- a/python/ext/aubioproxy.c +++ b/python/ext/aubioproxy.c @@ -46,7 +46,7 @@ PyAubio_IsValidVector (PyObject * input) { return 0; } - long length = PyArray_SIZE ((PyArrayObject *)input); + npy_intp length = PyArray_SIZE ((PyArrayObject *)input); if (length <= 0) { PyErr_SetString (PyExc_ValueError, "input array size should be greater than 0"); return 0; @@ -120,12 +120,12 @@ PyAubio_ArrayToCFmat (PyObject *input, fmat_t *mat) { } // no need to really allocate fvec, just its struct member - long length = PyArray_DIM ((PyArrayObject *)input, 1); + npy_intp length = PyArray_DIM ((PyArrayObject *)input, 1); if (length <= 0) { PyErr_SetString (PyExc_ValueError, "input array dimension 1 should be greater than 0"); return 0; } - long height = PyArray_DIM ((PyArrayObject *)input, 0); + npy_intp height = PyArray_DIM ((PyArrayObject *)input, 0); if (height <= 0) { PyErr_SetString (PyExc_ValueError, "input array dimension 0 should be greater than 0"); return 0; diff --git a/python/ext/py-cvec.c b/python/ext/py-cvec.c index e1985662..6e3bb24c 100644 --- a/python/ext/py-cvec.c +++ b/python/ext/py-cvec.c @@ -143,7 +143,7 @@ Py_cvec_set_norm (Py_cvec * vec, PyObject *input, void * closure) if (!PyAubio_IsValidVector(input)) { return 1; } - long length = PyArray_SIZE ((PyArrayObject *)input); + npy_intp length = PyArray_SIZE ((PyArrayObject *)input); if (length != vec->length) { PyErr_Format (PyExc_ValueError, "input array has length %ld, but cvec has length %d", length, @@ -163,7 +163,7 @@ Py_cvec_set_phas (Py_cvec * vec, PyObject *input, void * closure) if (!PyAubio_IsValidVector(input)) { return 1; } - long length = PyArray_SIZE ((PyArrayObject *)input); + npy_intp length = PyArray_SIZE ((PyArrayObject *)input); if (length != vec->length) { PyErr_Format (PyExc_ValueError, "input array has length %ld, but cvec has length %d", length, -- 2.11.0