summaryrefslogtreecommitdiff
path: root/Modules/_ctypes/_ctypes.c
diff options
context:
space:
mode:
authorBatuhan Taşkaya <batuhanosmantaskaya@gmail.com>2020-04-10 17:46:36 +0300
committerGitHub <noreply@github.com>2020-04-10 07:46:36 -0700
commit0361556537686f857f1025ead75e6af4ca7cc94a (patch)
tree3cce4f12e341d4266d1308f94a92a7c4b25bcdf9 /Modules/_ctypes/_ctypes.c
parente3ec44d692d9442e640cf5b2d8708157a65cec3e (diff)
downloadcpython-git-0361556537686f857f1025ead75e6af4ca7cc94a.tar.gz
bpo-39481: PEP 585 for a variety of modules (GH-19423)
- concurrent.futures - ctypes - http.cookies - multiprocessing - queue - tempfile - unittest.case - urllib.parse
Diffstat (limited to 'Modules/_ctypes/_ctypes.c')
-rw-r--r--Modules/_ctypes/_ctypes.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/Modules/_ctypes/_ctypes.c b/Modules/_ctypes/_ctypes.c
index dab3939647..ba5ef397cf 100644
--- a/Modules/_ctypes/_ctypes.c
+++ b/Modules/_ctypes/_ctypes.c
@@ -4798,6 +4798,12 @@ Array_length(PyObject *myself)
return self->b_length;
}
+static PyMethodDef Array_methods[] = {
+ {"__class_getitem__", (PyCFunction)Py_GenericAlias,
+ METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
+ { NULL, NULL }
+};
+
static PySequenceMethods Array_as_sequence = {
Array_length, /* sq_length; */
0, /* sq_concat; */
@@ -4846,7 +4852,7 @@ PyTypeObject PyCArray_Type = {
0, /* tp_weaklistoffset */
0, /* tp_iter */
0, /* tp_iternext */
- 0, /* tp_methods */
+ Array_methods, /* tp_methods */
0, /* tp_members */
0, /* tp_getset */
0, /* tp_base */