projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9d71919
)
reduce overhead in __pyx_PyFloat_AsDouble() when not compiling in CPython
author
Stefan Behnel
<stefan_ml@behnel.de>
Tue, 3 Jul 2012 20:26:16 +0000
(22:26 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Tue, 3 Jul 2012 20:26:16 +0000
(22:26 +0200)
Cython/Compiler/PyrexTypes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/PyrexTypes.py
b/Cython/Compiler/PyrexTypes.py
index
4698476
..
f5f1f34
100755
(executable)
--- a/
Cython/Compiler/PyrexTypes.py
+++ b/
Cython/Compiler/PyrexTypes.py
@@
-3798,7
+3798,11
@@
static CYTHON_INLINE Py_ssize_t __Pyx_PyIndex_AsSsize_t(PyObject*);
static CYTHON_INLINE PyObject * __Pyx_PyInt_FromSize_t(size_t);
static CYTHON_INLINE size_t __Pyx_PyInt_AsSize_t(PyObject*);
+#if CYTHON_COMPILING_IN_CPYTHON
#define __pyx_PyFloat_AsDouble(x) (PyFloat_CheckExact(x) ? PyFloat_AS_DOUBLE(x) : PyFloat_AsDouble(x))
+#else
+#define __pyx_PyFloat_AsDouble(x) PyFloat_AsDouble(x)
+#endif
#define __pyx_PyFloat_AsFloat(x) ((float) __pyx_PyFloat_AsDouble(x))
""" + type_conversion_predeclarations