Revert "Backport METH_FASTCALL from Python 3.7 (#328)"

This reverts commit cf73bbd678.
This commit is contained in:
Justine Tunney 2022-05-12 06:49:54 -07:00
parent e7611a8476
commit 2ea1dc405c
102 changed files with 3299 additions and 2894 deletions

View file

@ -648,7 +648,7 @@ static PyObject *
cmath_log_impl(PyObject *module, Py_complex x, PyObject *y_obj);
static PyObject *
cmath_log(PyObject *module, PyObject **args, Py_ssize_t nargs)
cmath_log(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
Py_complex x;
@ -658,6 +658,10 @@ cmath_log(PyObject *module, PyObject **args, Py_ssize_t nargs)
&x, &y_obj)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("log", kwnames)) {
goto exit;
}
return_value = cmath_log_impl(module, x, y_obj);
exit:
@ -733,7 +737,7 @@ static PyObject *
cmath_rect_impl(PyObject *module, double r, double phi);
static PyObject *
cmath_rect(PyObject *module, PyObject **args, Py_ssize_t nargs)
cmath_rect(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
double r;
@ -743,6 +747,10 @@ cmath_rect(PyObject *module, PyObject **args, Py_ssize_t nargs)
&r, &phi)) {
goto exit;
}
if (!_PyArg_NoStackKeywords("rect", kwnames)) {
goto exit;
}
return_value = cmath_rect_impl(module, r, phi);
exit:
@ -852,7 +860,7 @@ PyDoc_STRVAR(cmath_isclose__doc__,
"not close to anything, even itself. inf and -inf are only close to themselves.");
#define CMATH_ISCLOSE_METHODDEF \
{"isclose", (PyCFunction)cmath_isclose, METH_FASTCALL|METH_KEYWORDS, cmath_isclose__doc__},
{"isclose", (PyCFunction)cmath_isclose, METH_FASTCALL, cmath_isclose__doc__},
static int
cmath_isclose_impl(PyObject *module, Py_complex a, Py_complex b,
@ -883,4 +891,4 @@ cmath_isclose(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwn
exit:
return return_value;
}
/*[clinic end generated code: output=51ba28d27d10264e input=a9049054013a1b77]*/
/*[clinic end generated code: output=93eff5d4c242ee57 input=a9049054013a1b77]*/