Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix numpy.i for python 3

PyFile_Check and PyInstance_Check have been removed from the C API
for python 3.  This removes calls to those two functions from
numpy.i for PY_MAJOR_VERSION >= 3 so that it builds with a
python 3 Python.h.
  • Loading branch information...
commit 18bcac097c289f0ee937563652f771fe89c174f2 1 parent 27690e3
@baeuml baeuml authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 doc/swig/numpy.i
View
4 doc/swig/numpy.i
@@ -50,9 +50,11 @@
if (PyDict_Check( py_obj)) return "dict" ;
if (PyList_Check( py_obj)) return "list" ;
if (PyTuple_Check( py_obj)) return "tuple" ;
- if (PyFile_Check( py_obj)) return "file" ;
if (PyModule_Check( py_obj)) return "module" ;
+%#if PY_MAJOR_VERSION < 3
+ if (PyFile_Check( py_obj)) return "file" ;
if (PyInstance_Check(py_obj)) return "instance" ;
+%#endif
return "unkown type";
}
Please sign in to comment.
Something went wrong with that request. Please try again.