From 6f20d1e7650fbb3ad61855ca5d85dff0aafe2f72 Mon Sep 17 00:00:00 2001 From: Pauli Virtanen Date: Sat, 17 Jul 2010 15:15:15 +0000 Subject: BUG: core: use PyCapsule objects only on Python >= 3.0, stay with PyCObjects on Python 2.x --- numpy/f2py/src/fortranobject.c | 4 ++-- numpy/f2py/src/fortranobject.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'numpy/f2py') diff --git a/numpy/f2py/src/fortranobject.c b/numpy/f2py/src/fortranobject.c index 05ecd1383..ff80fa7e5 100644 --- a/numpy/f2py/src/fortranobject.c +++ b/numpy/f2py/src/fortranobject.c @@ -914,10 +914,10 @@ int copy_ND_array(const PyArrayObject *arr, PyArrayObject *out) } /*********************************************/ -/* Compatibility functions for Python >= 2.7 */ +/* Compatibility functions for Python >= 3.0 */ /*********************************************/ -#if PY_VERSION_HEX >= 0X02070000 +#if PY_VERSION_HEX >= 0x03000000 PyObject * F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *)) diff --git a/numpy/f2py/src/fortranobject.h b/numpy/f2py/src/fortranobject.h index e4ebc4664..283021aa1 100644 --- a/numpy/f2py/src/fortranobject.h +++ b/numpy/f2py/src/fortranobject.h @@ -121,7 +121,7 @@ typedef struct { extern PyObject * PyFortranObject_New(FortranDataDef* defs, f2py_void_func init); extern PyObject * PyFortranObject_NewAsAttr(FortranDataDef* defs); -#if PY_VERSION_HEX >= 0x02070000 +#if PY_VERSION_HEX >= 0x03000000 PyObject * F2PyCapsule_FromVoidPtr(void *ptr, void (*dtor)(PyObject *)); void * F2PyCapsule_AsVoidPtr(PyObject *obj); -- cgit v1.2.1