11#include  "parts.h" 
22#include  "util.h" 
33
4- #define  Py_BUILD_CORE 
5- #include  "pycore_complexobject.h" 
6- 
74
85static  PyObject  * 
96complex_fromccomplex (PyObject  * Py_UNUSED (module ), PyObject  * obj )
@@ -60,48 +57,10 @@ _py_c_neg(PyObject *Py_UNUSED(module), PyObject *num)
6057        return Py_BuildValue("Di", &res, errno);                 \
6158    };
6259
63- #define  _PY_CR_FUNC2 (suffix )                                     \
64-     static PyObject *                                            \
65-     _py_cr_##suffix(PyObject *Py_UNUSED(module), PyObject *args) \
66-     {                                                            \
67-         Py_complex a, res;                                       \
68-         double b;                                                \
69-                                                                  \
70-         if (!PyArg_ParseTuple(args, "Dd", &a, &b)) {             \
71-             return NULL;                                         \
72-         }                                                        \
73-                                                                  \
74-         errno = 0;                                               \
75-         res = _Py_cr_##suffix(a, b);                             \
76-         return Py_BuildValue("Di", &res, errno);                 \
77-     };
78- 
79- #define  _PY_RC_FUNC2 (suffix )                                     \
80-     static PyObject *                                            \
81-     _py_rc_##suffix(PyObject *Py_UNUSED(module), PyObject *args) \
82-     {                                                            \
83-         Py_complex b, res;                                       \
84-         double a;                                                \
85-                                                                  \
86-         if (!PyArg_ParseTuple(args, "dD", &a, &b)) {             \
87-             return NULL;                                         \
88-         }                                                        \
89-                                                                  \
90-         errno = 0;                                               \
91-         res = _Py_rc_##suffix(a, b);                             \
92-         return Py_BuildValue("Di", &res, errno);                 \
93-     };
94- 
9560_PY_C_FUNC2 (sum )
96- _PY_CR_FUNC2 (sum )
9761_PY_C_FUNC2 (diff )
98- _PY_CR_FUNC2 (diff )
99- _PY_RC_FUNC2 (diff )
10062_PY_C_FUNC2 (prod )
101- _PY_CR_FUNC2 (prod )
10263_PY_C_FUNC2 (quot )
103- _PY_CR_FUNC2 (quot )
104- _PY_RC_FUNC2 (quot )
10564_PY_C_FUNC2 (pow )
10665
10766static  PyObject * 
@@ -127,16 +86,10 @@ static PyMethodDef test_methods[] = {
12786    {"complex_fromccomplex" , complex_fromccomplex , METH_O },
12887    {"complex_asccomplex" , complex_asccomplex , METH_O },
12988    {"_py_c_sum" , _py_c_sum , METH_VARARGS },
130-     {"_py_cr_sum" , _py_cr_sum , METH_VARARGS },
13189    {"_py_c_diff" , _py_c_diff , METH_VARARGS },
132-     {"_py_cr_diff" , _py_cr_diff , METH_VARARGS },
133-     {"_py_rc_diff" , _py_rc_diff , METH_VARARGS },
13490    {"_py_c_neg" , _py_c_neg , METH_O },
13591    {"_py_c_prod" , _py_c_prod , METH_VARARGS },
136-     {"_py_cr_prod" , _py_cr_prod , METH_VARARGS },
13792    {"_py_c_quot" , _py_c_quot , METH_VARARGS },
138-     {"_py_cr_quot" , _py_cr_quot , METH_VARARGS },
139-     {"_py_rc_quot" , _py_rc_quot , METH_VARARGS },
14093    {"_py_c_pow" , _py_c_pow , METH_VARARGS },
14194    {"_py_c_abs" , _py_c_abs , METH_O },
14295    {NULL },
0 commit comments