diff options
author | Charles Harris <charlesr.harris@gmail.com> | 2010-05-03 07:50:02 +0000 |
---|---|---|
committer | Charles Harris <charlesr.harris@gmail.com> | 2010-05-03 07:50:02 +0000 |
commit | bc656ee7cb00a6c4ad0d43f1cdd36bf8c9a026ed (patch) | |
tree | 43db63bf9d9ad272bb252705de933c8a9ad3940c /numpy/f2py/src/fortranobject.c | |
parent | 82d8d97ac30e20f9ae605df228bee43d89ef72a2 (diff) | |
download | numpy-bc656ee7cb00a6c4ad0d43f1cdd36bf8c9a026ed.tar.gz |
ENH, BUG: PyCObject will be deprecated in python 2.7. So use the NpyCapsule
compatibility functions in npy_3kcompat.h to replace the current calls.
This gets rid of a number of version checks and is easier to maintain.
Fix bug that was present in the ufunc _loop1d_list_free destructor in
the python3k case.
Diffstat (limited to 'numpy/f2py/src/fortranobject.c')
-rw-r--r-- | numpy/f2py/src/fortranobject.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index 1cd3d3f31..05ecd1383 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -913,11 +913,11 @@ int copy_ND_array(const PyArrayObject *arr, PyArrayObject *out) return PyArray_CopyInto(out, (PyArrayObject *)arr); } -/*******************************************/ -/* Compatibility functions for Python 3.1 */ -/*******************************************/ +/*********************************************/ +/* Compatibility functions for Python >= 2.7 */ +/*********************************************/ -#if PY_VERSION_HEX >= 0X03010000 +#if PY_VERSION_HEX >= 0X02070000 PyObject * F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *)) |