Skip to content

Commit 549e443

Browse files
committed
fixing shape type
git-svn-id: https://svn.grrrr.org/ext/trunk/py@3646 4d9ac71a-51e6-0310-8455-cad1006bcd31
1 parent f5ef409 commit 549e443

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/pybuffer.cpp

+5-3
Original file line numberDiff line numberDiff line change
@@ -260,14 +260,16 @@ static PyObject *buffer_item(PyObject *s,Py_ssize_t i)
260260
return ret;
261261
}
262262

263+
#ifndef PY_NUMPY
264+
typedef int npy_intp;
265+
#endif
266+
263267
PyObject *arrayfrombuffer(PyObject *buf,int c,int n)
264268
{
265269
#ifdef PY_ARRAYS
266270
if(arrsupport()) {
267271
PyObject *arr;
268-
int shape[2];
269-
shape[0] = n;
270-
shape[1] = c;
272+
npy_intp shape[2] = {n,c};
271273
#ifdef PY_NUMARRAY
272274
arr = (PyObject *)NA_NewAllFromBuffer(c == 1?1:2,shape,numtype,buf,0,0,NA_ByteOrder(),1,1);
273275
#else

0 commit comments

Comments
 (0)