From f25f2e2e8c8e48490d22b0cdf67f575608701f6f Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Sun, 19 Sep 2021 18:05:30 +0300 Subject: Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450) The cast to PyCFunction is redundant. Overuse of redundant casts can hide actual bugs. --- Objects/tupleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Objects/tupleobject.c') diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index b7fd421196..3e3aea47cc 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -887,7 +887,7 @@ static PyMethodDef tuple_methods[] = { TUPLE___GETNEWARGS___METHODDEF TUPLE_INDEX_METHODDEF TUPLE_COUNT_METHODDEF - {"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL, NULL} /* sentinel */ }; -- cgit v1.2.1