summaryrefslogtreecommitdiffstats
path: root/Modules/clinic/mathmodule.c.h
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2017-07-03 18:20:15 (GMT)
committerGitHub <noreply@github.com>2017-07-03 18:20:15 (GMT)
commit6969eaf4682beb01bc95eeb14f5ce6c01312e297 (patch)
treec81a3d9bca3e9d01f557c46a8534a4e3873403f9 /Modules/clinic/mathmodule.c.h
parentaa0aa0492c5fffe750a26d2ab13737a1a6d7d63c (diff)
downloadcpython-6969eaf4682beb01bc95eeb14f5ce6c01312e297.zip
cpython-6969eaf4682beb01bc95eeb14f5ce6c01312e297.tar.gz
cpython-6969eaf4682beb01bc95eeb14f5ce6c01312e297.tar.bz2
bpo-29464: Rename METH_FASTCALL to METH_FASTCALL|METH_KEYWORDS and make (#1955)
the bare METH_FASTCALL be used for functions with positional-only parameters.
Diffstat (limited to 'Modules/clinic/mathmodule.c.h')
-rw-r--r--Modules/clinic/mathmodule.c.h34
1 files changed, 7 insertions, 27 deletions
diff --git a/Modules/clinic/mathmodule.c.h b/Modules/clinic/mathmodule.c.h
index 7b23e77..9ce443f 100644
--- a/Modules/clinic/mathmodule.c.h
+++ b/Modules/clinic/mathmodule.c.h
@@ -15,16 +15,12 @@ static PyObject *
math_gcd_impl(PyObject *module, PyObject *a, PyObject *b);
static PyObject *
-math_gcd(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+math_gcd(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *a;
PyObject *b;
- if (!_PyArg_NoStackKeywords("gcd", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "gcd",
2, 2,
&a, &b)) {
@@ -136,16 +132,12 @@ static PyObject *
math_ldexp_impl(PyObject *module, double x, PyObject *i);
static PyObject *
-math_ldexp(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+math_ldexp(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
PyObject *i;
- if (!_PyArg_NoStackKeywords("ldexp", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_ParseStack(args, nargs, "dO:ldexp",
&x, &i)) {
goto exit;
@@ -261,16 +253,12 @@ static PyObject *
math_fmod_impl(PyObject *module, double x, double y);
static PyObject *
-math_fmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+math_fmod(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
- if (!_PyArg_NoStackKeywords("fmod", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_ParseStack(args, nargs, "dd:fmod",
&x, &y)) {
goto exit;
@@ -294,16 +282,12 @@ static PyObject *
math_hypot_impl(PyObject *module, double x, double y);
static PyObject *
-math_hypot(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+math_hypot(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
- if (!_PyArg_NoStackKeywords("hypot", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_ParseStack(args, nargs, "dd:hypot",
&x, &y)) {
goto exit;
@@ -327,16 +311,12 @@ static PyObject *
math_pow_impl(PyObject *module, double x, double y);
static PyObject *
-math_pow(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+math_pow(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
double x;
double y;
- if (!_PyArg_NoStackKeywords("pow", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_ParseStack(args, nargs, "dd:pow",
&x, &y)) {
goto exit;
@@ -505,7 +485,7 @@ PyDoc_STRVAR(math_isclose__doc__,
"only close to themselves.");
#define MATH_ISCLOSE_METHODDEF \
- {"isclose", (PyCFunction)math_isclose, METH_FASTCALL, math_isclose__doc__},
+ {"isclose", (PyCFunction)math_isclose, METH_FASTCALL|METH_KEYWORDS, math_isclose__doc__},
static int
math_isclose_impl(PyObject *module, double a, double b, double rel_tol,
@@ -536,4 +516,4 @@ math_isclose(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwna
exit:
return return_value;
}
-/*[clinic end generated code: output=c9f1ac6ded547cc8 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=d9bfbd645d273209 input=a9049054013a1b77]*/