[PYTHON MATRIX-SIG] ncmodule memory fix

Kyle Schalm kschalm@geog.ubc.ca
Fri, 15 Nov 1996 13:12:01 -0800 (PST)


the netcdf module (array version) has a memory fix. you can apply the
patch below or download the new version of ncmodule.c from

http://www.geog.ubc.ca/~kschalm/


here's the patch (< = new version, > = old version):

1521c1521
<   PyObject *list, *m, *t, *ret, *a; /* array taken from arg */
---
>   PyObject *list, *m, *t, *a; /* array taken from arg */
1591,1593c1591
<   ret = PyArray_FromDimsAndData(self->ndims, dimlen, array_type, t_data);
<   if (ret != NULL) ((PyArrayObject *) ret)->flags |= OWN_DATA;
<   return ret;
---
>   return PyArray_FromDimsAndData(self->ndims, dimlen, array_type, t_data);



--Kyle

=================
MATRIX-SIG  - SIG on Matrix Math for Python

send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================