summaryrefslogtreecommitdiffstats
path: root/Modules/_collectionsmodule.c
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/_collectionsmodule.c
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/_collectionsmodule.c')
-rw-r--r--Modules/_collectionsmodule.c18
1 files changed, 3 insertions, 15 deletions
diff --git a/Modules/_collectionsmodule.c b/Modules/_collectionsmodule.c
index 6f78796..aa582ed 100644
--- a/Modules/_collectionsmodule.c
+++ b/Modules/_collectionsmodule.c
@@ -912,14 +912,10 @@ done:
}
static PyObject *
-deque_rotate(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
- PyObject *kwnames)
+deque_rotate(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t n=1;
- if (!_PyArg_NoStackKeywords("rotate", kwnames)) {
- return NULL;
- }
if (!_PyArg_ParseStack(args, nargs, "|n:rotate", &n)) {
return NULL;
}
@@ -1052,8 +1048,7 @@ deque_len(dequeobject *deque)
}
static PyObject *
-deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
- PyObject *kwnames)
+deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t i, n, start=0, stop=Py_SIZE(deque);
PyObject *v, *item;
@@ -1062,9 +1057,6 @@ deque_index(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
size_t start_state = deque->state;
int cmp;
- if (!_PyArg_NoStackKeywords("index", kwnames)) {
- return NULL;
- }
if (!_PyArg_ParseStack(args, nargs, "O|O&O&:index", &v,
_PyEval_SliceIndexNotNone, &start,
_PyEval_SliceIndexNotNone, &stop)) {
@@ -1133,17 +1125,13 @@ PyDoc_STRVAR(index_doc,
*/
static PyObject *
-deque_insert(dequeobject *deque, PyObject **args, Py_ssize_t nargs,
- PyObject *kwnames)
+deque_insert(dequeobject *deque, PyObject **args, Py_ssize_t nargs)
{
Py_ssize_t index;
Py_ssize_t n = Py_SIZE(deque);
PyObject *value;
PyObject *rv;
- if (!_PyArg_NoStackKeywords("insert", kwnames)) {
- return NULL;
- }
if (!_PyArg_ParseStack(args, nargs, "nO:insert", &index, &value)) {
return NULL;
}