Skip to content

Commit 7a490e0

Browse files
committed
C89 compatibility (for windows installation with Python 2.7)
1 parent 90554f6 commit 7a490e0

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

arc/arc_c_extensions.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -273,8 +273,9 @@ static PyObject *NumerovWavefunction(PyObject *self, PyObject *args) {
273273
for (i=totalLength; i<2*totalLength; i++) sol[i]=sol[i]*sol[i];
274274

275275
// return the array as a numpy array (numpy will free it later)
276-
npy_intp dims[2] = {totalLength,totalLength};
277-
PyObject *narray = PyArray_SimpleNewFromData(2, dims, NPY_DOUBLE, sol);
276+
dims[0] = totalLength;
277+
dims[0] = totalLength;
278+
narray = PyArray_SimpleNewFromData(2, dims, NPY_DOUBLE, sol);
278279
//free(sol); # freeing of solution array should be done from Numpy
279280
// this is the critical line - tell numpy it has to free the data
280281
PyArray_ENABLEFLAGS((PyArrayObject*)narray, NPY_ARRAY_OWNDATA);

0 commit comments

Comments
 (0)