summaryrefslogtreecommitdiffstats
path: root/Objects/clinic/dictobject.c.h
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2017-01-17 01:21:47 (GMT)
commit0c4a828cadfccd8b95a39f7930705de75ed5f729 (patch)
tree713eeceb5c63f4324fa83e9603a0284272e9eb58 /Objects/clinic/dictobject.c.h
parent093119e4eb8424451ef24a5a5a3ce9881d77abd5 (diff)
downloadcpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.zip
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.tar.gz
cpython-0c4a828cadfccd8b95a39f7930705de75ed5f729.tar.bz2
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
Diffstat (limited to 'Objects/clinic/dictobject.c.h')
-rw-r--r--Objects/clinic/dictobject.c.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/Objects/clinic/dictobject.c.h b/Objects/clinic/dictobject.c.h
index d0cdfc3..3f06c0b 100644
--- a/Objects/clinic/dictobject.c.h
+++ b/Objects/clinic/dictobject.c.h
@@ -9,23 +9,27 @@ PyDoc_STRVAR(dict_fromkeys__doc__,
"Returns a new dict with keys from iterable and values equal to value.");
#define DICT_FROMKEYS_METHODDEF \
- {"fromkeys", (PyCFunction)dict_fromkeys, METH_VARARGS|METH_CLASS, dict_fromkeys__doc__},
+ {"fromkeys", (PyCFunction)dict_fromkeys, METH_FASTCALL|METH_CLASS, dict_fromkeys__doc__},
static PyObject *
dict_fromkeys_impl(PyTypeObject *type, PyObject *iterable, PyObject *value);
static PyObject *
-dict_fromkeys(PyTypeObject *type, PyObject *args)
+dict_fromkeys(PyTypeObject *type, PyObject **args, Py_ssize_t nargs, PyObject *kwnames)
{
PyObject *return_value = NULL;
PyObject *iterable;
PyObject *value = Py_None;
- if (!PyArg_UnpackTuple(args, "fromkeys",
+ if (!_PyArg_UnpackStack(args, nargs, "fromkeys",
1, 2,
&iterable, &value)) {
goto exit;
}
+
+ if (!_PyArg_NoStackKeywords("fromkeys", kwnames)) {
+ goto exit;
+ }
return_value = dict_fromkeys_impl(type, iterable, value);
exit:
@@ -40,4 +44,4 @@ PyDoc_STRVAR(dict___contains____doc__,
#define DICT___CONTAINS___METHODDEF \
{"__contains__", (PyCFunction)dict___contains__, METH_O|METH_COEXIST, dict___contains____doc__},
-/*[clinic end generated code: output=926326109e3d9839 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=69f3d767ed44e8ec input=a9049054013a1b77]*/