We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c69d405 commit 9b431afCopy full SHA for 9b431af
Modules/_testcapi/complex.c
@@ -102,22 +102,16 @@ _py_c_neg(PyObject *Py_UNUSED(module), PyObject *num)
102
static PyObject * \
103
_py_c_##suffix(PyObject *Py_UNUSED(module), PyObject *args) \
104
{ \
105
- Py_complex num, exp; \
+ Py_complex num, exp, res; \
106
PyObject *res; \
107
\
108
if (!PyArg_ParseTuple(args, "DD", &num, &exp)) { \
109
return NULL; \
110
} \
111
112
errno = 0; \
113
- num = _Py_c_##suffix(num, exp); \
114
- \
115
- res = PyComplex_FromCComplex(num); \
116
- if (!res) { \
117
- return NULL; \
118
- } \
119
120
- return Py_BuildValue("Ni", res, errno); \
+ res = _Py_c_##suffix(num, exp); \
+ return Py_BuildValue("Di", res, errno); \
121
};
122
123
_PY_C_FUNC2(sum)
0 commit comments