summaryrefslogtreecommitdiff
path: root/numpy/numarray/_capi.c
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/numarray/_capi.c
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/numarray/_capi.c')
-rw-r--r--numpy/numarray/_capi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/numpy/numarray/_capi.c b/numpy/numarray/_capi.c
index 875e383ea..534057095 100644
--- a/numpy/numarray/_capi.c
+++ b/numpy/numarray/_capi.c
@@ -3402,7 +3402,7 @@ PyMODINIT_FUNC init_capi(void)
_Error = PyErr_NewException("numpy.numarray._capi.error", NULL, NULL);
/* Create a CObject containing the API pointer array's address */
-#if PY_VERSION_HEX >= 0x03010000
+#if PY_VERSION_HEX >= 0x02070000
m = PyModule_Create(&moduledef);
c_api_object = PyCapsule_New((void *)libnumarray_API, NULL, NULL);
if (c_api_object == NULL) {