summaryrefslogtreecommitdiff
path: root/numpy/random/mtrand
diff options
context:
space:
mode:
authorCharles Harris <charlesr.harris@gmail.com>2010-05-03 07:50:02 +0000
committerCharles Harris <charlesr.harris@gmail.com>2010-05-03 07:50:02 +0000
commitbc656ee7cb00a6c4ad0d43f1cdd36bf8c9a026ed (patch)
tree43db63bf9d9ad272bb252705de933c8a9ad3940c /numpy/random/mtrand
parent82d8d97ac30e20f9ae605df228bee43d89ef72a2 (diff)
downloadnumpy-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/random/mtrand')
-rw-r--r--numpy/random/mtrand/Python.pxi3
1 files changed, 3 insertions, 0 deletions
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)