@@ -57,48 +57,10 @@ _py_c_neg(PyObject *Py_UNUSED(module), PyObject *num)
5757 return Py_BuildValue("Di", &res, errno); \
5858 };
5959
60- #define _PY_CR_FUNC2 (suffix ) \
61- static PyObject * \
62- _py_cr_##suffix(PyObject *Py_UNUSED(module), PyObject *args) \
63- { \
64- Py_complex a, res; \
65- double b; \
66- \
67- if (!PyArg_ParseTuple(args, "Dd", &a, &b)) { \
68- return NULL; \
69- } \
70- \
71- errno = 0; \
72- res = _Py_cr_##suffix(a, b); \
73- return Py_BuildValue("Di", &res, errno); \
74- };
75-
76- #define _PY_RC_FUNC2 (suffix ) \
77- static PyObject * \
78- _py_rc_##suffix(PyObject *Py_UNUSED(module), PyObject *args) \
79- { \
80- Py_complex b, res; \
81- double a; \
82- \
83- if (!PyArg_ParseTuple(args, "dD", &a, &b)) { \
84- return NULL; \
85- } \
86- \
87- errno = 0; \
88- res = _Py_rc_##suffix(a, b); \
89- return Py_BuildValue("Di", &res, errno); \
90- };
91-
9260_PY_C_FUNC2 (sum )
93- _PY_CR_FUNC2 (sum )
9461_PY_C_FUNC2 (diff )
95- _PY_CR_FUNC2 (diff )
96- _PY_RC_FUNC2 (diff )
9762_PY_C_FUNC2 (prod )
98- _PY_CR_FUNC2 (prod )
9963_PY_C_FUNC2 (quot )
100- _PY_CR_FUNC2 (quot )
101- _PY_RC_FUNC2 (quot )
10264_PY_C_FUNC2 (pow )
10365
10466static PyObject *
@@ -124,16 +86,10 @@ static PyMethodDef test_methods[] = {
12486 {"complex_fromccomplex" , complex_fromccomplex , METH_O },
12587 {"complex_asccomplex" , complex_asccomplex , METH_O },
12688 {"_py_c_sum" , _py_c_sum , METH_VARARGS },
127- {"_py_cr_sum" , _py_cr_sum , METH_VARARGS },
12889 {"_py_c_diff" , _py_c_diff , METH_VARARGS },
129- {"_py_cr_diff" , _py_cr_diff , METH_VARARGS },
130- {"_py_rc_diff" , _py_rc_diff , METH_VARARGS },
13190 {"_py_c_neg" , _py_c_neg , METH_O },
13291 {"_py_c_prod" , _py_c_prod , METH_VARARGS },
133- {"_py_cr_prod" , _py_cr_prod , METH_VARARGS },
13492 {"_py_c_quot" , _py_c_quot , METH_VARARGS },
135- {"_py_cr_quot" , _py_cr_quot , METH_VARARGS },
136- {"_py_rc_quot" , _py_rc_quot , METH_VARARGS },
13793 {"_py_c_pow" , _py_c_pow , METH_VARARGS },
13894 {"_py_c_abs" , _py_c_abs , METH_O },
13995 {NULL },
0 commit comments