summaryrefslogtreecommitdiffstats
path: root/Modules/clinic
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-01-02 16:38:47 (GMT)
committerGitHub <noreply@github.com>2021-01-02 16:38:47 (GMT)
commit75bf107c62fbdc00af51ee4f6ab69df4bd201104 (patch)
tree425c069dc5f77c34205ff830296ab9d01a15d271 /Modules/clinic
parent49cd68fb1ed4cbaf109308c0a7c8c1efcf6f3775 (diff)
downloadcpython-75bf107c62fbdc00af51ee4f6ab69df4bd201104.zip
cpython-75bf107c62fbdc00af51ee4f6ab69df4bd201104.tar.gz
cpython-75bf107c62fbdc00af51ee4f6ab69df4bd201104.tar.bz2
bpo-40077: Convert arraymodule to use heap types and establish module state (GH-23124)
Diffstat (limited to 'Modules/clinic')
-rw-r--r--Modules/clinic/arraymodule.c.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h
index 300cd13..d0b70c4 100644
--- a/Modules/clinic/arraymodule.c.h
+++ b/Modules/clinic/arraymodule.c.h
@@ -108,7 +108,28 @@ PyDoc_STRVAR(array_array_extend__doc__,
"Append items to the end of the array.");
#define ARRAY_ARRAY_EXTEND_METHODDEF \
- {"extend", (PyCFunction)array_array_extend, METH_O, array_array_extend__doc__},
+ {"extend", (PyCFunction)(void(*)(void))array_array_extend, METH_METHOD|METH_FASTCALL|METH_KEYWORDS, array_array_extend__doc__},
+
+static PyObject *
+array_array_extend_impl(arrayobject *self, PyTypeObject *cls, PyObject *bb);
+
+static PyObject *
+array_array_extend(arrayobject *self, PyTypeObject *cls, PyObject *const *args, Py_ssize_t nargs, PyObject *kwnames)
+{
+ PyObject *return_value = NULL;
+ static const char * const _keywords[] = {"", NULL};
+ static _PyArg_Parser _parser = {"O:extend", _keywords, 0};
+ PyObject *bb;
+
+ if (!_PyArg_ParseStackAndKeywords(args, nargs, kwnames, &_parser,
+ &bb)) {
+ goto exit;
+ }
+ return_value = array_array_extend_impl(self, cls, bb);
+
+exit:
+ return return_value;
+}
PyDoc_STRVAR(array_array_insert__doc__,
"insert($self, i, v, /)\n"
@@ -514,4 +535,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__,
#define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \
{"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__},
-/*[clinic end generated code: output=91c1cded65a1285f input=a9049054013a1b77]*/
+/*[clinic end generated code: output=a7f71a18b994c88f input=a9049054013a1b77]*/