summaryrefslogtreecommitdiffstats
path: root/Python/clinic/bltinmodule.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 /Python/clinic/bltinmodule.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 'Python/clinic/bltinmodule.c.h')
-rw-r--r--Python/clinic/bltinmodule.c.h76
1 files changed, 14 insertions, 62 deletions
diff --git a/Python/clinic/bltinmodule.c.h b/Python/clinic/bltinmodule.c.h
index 0e46f94..fa327da 100644
--- a/Python/clinic/bltinmodule.c.h
+++ b/Python/clinic/bltinmodule.c.h
@@ -88,16 +88,12 @@ static PyObject *
builtin_format_impl(PyObject *module, PyObject *value, PyObject *format_spec);
static PyObject *
-builtin_format(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_format(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *value;
PyObject *format_spec = NULL;
- if (!_PyArg_NoStackKeywords("format", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_ParseStack(args, nargs, "O|U:format",
&value, &format_spec)) {
goto exit;
@@ -154,7 +150,7 @@ PyDoc_STRVAR(builtin_compile__doc__,
"in addition to any features explicitly specified.");
#define BUILTIN_COMPILE_METHODDEF \
- {"compile", (PyCFunction)builtin_compile, METH_FASTCALL, builtin_compile__doc__},
+ {"compile", (PyCFunction)builtin_compile, METH_FASTCALL|METH_KEYWORDS, builtin_compile__doc__},
static PyObject *
builtin_compile_impl(PyObject *module, PyObject *source, PyObject *filename,
@@ -197,16 +193,12 @@ static PyObject *
builtin_divmod_impl(PyObject *module, PyObject *x, PyObject *y);
static PyObject *
-builtin_divmod(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_divmod(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *x;
PyObject *y;
- if (!_PyArg_NoStackKeywords("divmod", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "divmod",
2, 2,
&x, &y)) {
@@ -238,17 +230,13 @@ builtin_eval_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
-builtin_eval(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_eval(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *source;
PyObject *globals = Py_None;
PyObject *locals = Py_None;
- if (!_PyArg_NoStackKeywords("eval", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "eval",
1, 3,
&source, &globals, &locals)) {
@@ -280,17 +268,13 @@ builtin_exec_impl(PyObject *module, PyObject *source, PyObject *globals,
PyObject *locals);
static PyObject *
-builtin_exec(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_exec(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *source;
PyObject *globals = Py_None;
PyObject *locals = Py_None;
- if (!_PyArg_NoStackKeywords("exec", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "exec",
1, 3,
&source, &globals, &locals)) {
@@ -338,16 +322,12 @@ static PyObject *
builtin_hasattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
-builtin_hasattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_hasattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
PyObject *name;
- if (!_PyArg_NoStackKeywords("hasattr", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "hasattr",
2, 2,
&obj, &name)) {
@@ -387,17 +367,13 @@ builtin_setattr_impl(PyObject *module, PyObject *obj, PyObject *name,
PyObject *value);
static PyObject *
-builtin_setattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_setattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
PyObject *name;
PyObject *value;
- if (!_PyArg_NoStackKeywords("setattr", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "setattr",
3, 3,
&obj, &name, &value)) {
@@ -424,16 +400,12 @@ static PyObject *
builtin_delattr_impl(PyObject *module, PyObject *obj, PyObject *name);
static PyObject *
-builtin_delattr(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_delattr(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
PyObject *name;
- if (!_PyArg_NoStackKeywords("delattr", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "delattr",
2, 2,
&obj, &name)) {
@@ -537,17 +509,13 @@ static PyObject *
builtin_pow_impl(PyObject *module, PyObject *x, PyObject *y, PyObject *z);
static PyObject *
-builtin_pow(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_pow(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *x;
PyObject *y;
PyObject *z = Py_None;
- if (!_PyArg_NoStackKeywords("pow", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "pow",
2, 3,
&x, &y, &z)) {
@@ -578,15 +546,11 @@ static PyObject *
builtin_input_impl(PyObject *module, PyObject *prompt);
static PyObject *
-builtin_input(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_input(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *prompt = NULL;
- if (!_PyArg_NoStackKeywords("input", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "input",
0, 1,
&prompt)) {
@@ -626,16 +590,12 @@ static PyObject *
builtin_sum_impl(PyObject *module, PyObject *iterable, PyObject *start);
static PyObject *
-builtin_sum(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_sum(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *iterable;
PyObject *start = NULL;
- if (!_PyArg_NoStackKeywords("sum", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "sum",
1, 2,
&iterable, &start)) {
@@ -665,16 +625,12 @@ builtin_isinstance_impl(PyObject *module, PyObject *obj,
PyObject *class_or_tuple);
static PyObject *
-builtin_isinstance(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_isinstance(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *obj;
PyObject *class_or_tuple;
- if (!_PyArg_NoStackKeywords("isinstance", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "isinstance",
2, 2,
&obj, &class_or_tuple)) {
@@ -704,16 +660,12 @@ builtin_issubclass_impl(PyObject *module, PyObject *cls,
PyObject *class_or_tuple);
static PyObject *
-builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
+builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs)
{
PyObject *return_value = NULL;
PyObject *cls;
PyObject *class_or_tuple;
- if (!_PyArg_NoStackKeywords("issubclass", kwnames)) {
- goto exit;
- }
-
if (!_PyArg_UnpackStack(args, nargs, "issubclass",
2, 2,
&cls, &class_or_tuple)) {
@@ -724,4 +676,4 @@ builtin_issubclass(PyObject *module, PyObject **args, Py_ssize_t nargs, PyObject
exit:
return return_value;
}
-/*[clinic end generated code: output=e1a7417a7b33eeec input=a9049054013a1b77]*/
+/*[clinic end generated code: output=09752daa8cdd6ec7 input=a9049054013a1b77]*/