diff options
author | da-woods <dw-git@d-woods.co.uk> | 2022-12-10 10:53:37 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-12-10 10:53:37 +0000 |
commit | 39ee651a45e45e31805aa94d5c119f0283637f94 (patch) | |
tree | d2fc377d7c03ff9c519e151974643c27850909e1 | |
parent | beecec26ed2416ffb7e74a9396ff1bfd6d887319 (diff) | |
download | cython-39ee651a45e45e31805aa94d5c119f0283637f94.tar.gz |
Fix error from combination of two Complex.c changes (#5167)
Essentially SoftComplexToPy required another bit of utility code that has now become tempita. I've just skipped using this utility code
-rw-r--r-- | Cython/Utility/Complex.c | 3 |
1 files changed, 1 insertions, 2 deletions
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)); } |