From bc656ee7cb00a6c4ad0d43f1cdd36bf8c9a026ed Mon Sep 17 00:00:00 2001 From: Charles Harris Date: Mon, 3 May 2010 07:50:02 +0000 Subject: 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. --- numpy/random/mtrand/Python.pxi | 3 +++ 1 file changed, 3 insertions(+) (limited to 'numpy/random') diff --git a/numpy/random/mtrand/Python.pxi b/numpy/random/mtrand/Python.pxi index 4628be93d..2f7adf096 100644 --- a/numpy/random/mtrand/Python.pxi +++ b/numpy/random/mtrand/Python.pxi @@ -29,6 +29,9 @@ cdef extern from "Python.h": void Py_XINCREF(object obj) # CObject API +# If this is uncommented it needs to be fixed to use PyCapsule +# for Python >= 2.7 +# # ctypedef void (*destructor1)(void* cobj) # ctypedef void (*destructor2)(void* cobj, void* desc) # int PyCObject_Check(object p) -- cgit v1.2.1