Created
July 19, 2013 21:31
-
-
Save eltjpm/6042504 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: numba/external/pyapi.py | |
=================================================================== | |
--- numba/external/pyapi.py (revision 82154) | |
+++ numba/external/pyapi.py (revision 82155) | |
@@ -179,12 +179,17 @@ | |
def from_long(name, type): | |
create_func(name, object_, type, _from_long) | |
-from_long('PyLong_FromLong', long_) | |
+if not PY3: | |
+ from_long('PyInt_FromLong', long_) | |
+ from_long('PyInt_FromSize_t', size_t) # new in 2.6 | |
+ from_long('PyInt_FromSsize_t', Py_ssize_t) | |
+else: | |
+ from_long('PyLong_FromLong', long_) | |
+ from_long('PyLong_FromSize_t', size_t) | |
+ from_long('PyLong_FromSsize_t', Py_ssize_t) | |
from_long('PyLong_FromUnsignedLong', ulong) | |
from_long('PyLong_FromLongLong', longlong) | |
from_long('PyLong_FromUnsignedLongLong', ulonglong) | |
-from_long('PyLong_FromSize_t', size_t) # new in 2.6 | |
-from_long('PyLong_FromSsize_t', Py_ssize_t) | |
class PyFloat_AsDouble(ExternalFunction): | |
arg_types = [object_] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment