diff options
| author | Serhiy Storchaka <storchaka@gmail.com> | 2021-09-19 18:05:30 +0300 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-19 18:05:30 +0300 |
| commit | f25f2e2e8c8e48490d22b0cdf67f575608701f6f (patch) | |
| tree | 5357fbf7251027bd5eed255a4f22639b0119d7a7 /Objects/weakrefobject.c | |
| parent | a6241773869b80f2b1cac63f26ba646aa808a8db (diff) | |
| download | cpython-git-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.tar.gz | |
Clean up initialization __class_getitem__ with Py_GenericAlias. (GH-28450)
The cast to PyCFunction is redundant. Overuse of redundant casts
can hide actual bugs.
Diffstat (limited to 'Objects/weakrefobject.c')
| -rw-r--r-- | Objects/weakrefobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/weakrefobject.c b/Objects/weakrefobject.c index bb56c7dbdb..8922768975 100644 --- a/Objects/weakrefobject.c +++ b/Objects/weakrefobject.c @@ -363,7 +363,7 @@ static PyMemberDef weakref_members[] = { }; static PyMethodDef weakref_methods[] = { - {"__class_getitem__", (PyCFunction)Py_GenericAlias, + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL} /* Sentinel */ }; |
