mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
The cast to PyCFunction is redundant. Overuse of redundant casts can hide actual bugs.
This commit is contained in:
parent
a624177386
commit
f25f2e2e8c
17 changed files with 21 additions and 21 deletions
|
@ -1049,7 +1049,7 @@ static PyMethodDef PyContextVar_methods[] = {
|
|||
_CONTEXTVARS_CONTEXTVAR_GET_METHODDEF
|
||||
_CONTEXTVARS_CONTEXTVAR_SET_METHODDEF
|
||||
_CONTEXTVARS_CONTEXTVAR_RESET_METHODDEF
|
||||
{"__class_getitem__", (PyCFunction)Py_GenericAlias,
|
||||
{"__class_getitem__", Py_GenericAlias,
|
||||
METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
|
||||
{NULL, NULL}
|
||||
};
|
||||
|
@ -1190,7 +1190,7 @@ static PyGetSetDef PyContextTokenType_getsetlist[] = {
|
|||
};
|
||||
|
||||
static PyMethodDef PyContextTokenType_methods[] = {
|
||||
{"__class_getitem__", (PyCFunction)Py_GenericAlias,
|
||||
{"__class_getitem__", Py_GenericAlias,
|
||||
METH_O|METH_CLASS, PyDoc_STR("See PEP 585")},
|
||||
{NULL}
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue