diff options
Diffstat (limited to 'Cython')
-rw-r--r-- | Cython/Compiler/ModuleNode.py | 2 | ||||
-rw-r--r-- | Cython/Utility/Complex.c | 3 |
2 files changed, 2 insertions, 3 deletions
diff --git a/Cython/Compiler/ModuleNode.py b/Cython/Compiler/ModuleNode.py index 0a7308562..635dcd543 100644 --- a/Cython/Compiler/ModuleNode.py +++ b/Cython/Compiler/ModuleNode.py @@ -2787,7 +2787,7 @@ class ModuleNode(Nodes.Node, Nodes.BlockNode): env.module_cname, Naming.pymoduledef_cname)) module_state.putln("#else") - module_state.putln('static %s %s_static = {};' % ( + module_state.putln('static %s %s_static = {0};' % ( Naming.modulestate_cname, Naming.modulestateglobal_cname )) diff --git a/Cython/Utility/Complex.c b/Cython/Utility/Complex.c index 6bd846033..642184486 100644 --- a/Cython/Utility/Complex.c +++ b/Cython/Utility/Complex.c @@ -349,12 +349,11 @@ static double __Pyx_SoftComplexToDouble(__pyx_t_double_complex value) { static PyObject *__pyx_Py_FromSoftComplex(__pyx_t_double_complex value); /* proto */ //////// SoftComplexToPy //////////////// -//@requires: ToPy //@requires: RealImag static PyObject *__pyx_Py_FromSoftComplex(__pyx_t_double_complex value) { if (__Pyx_CIMAG(value)) { - return __pyx_PyComplex_FromComplex(value); + return PyComplex_FromDoubles(__Pyx_CREAL(value), __Pyx_CIMAG(value)); } else { return PyFloat_FromDouble(__Pyx_CREAL(value)); } |