diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-09-19 15:05:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-19 15:05:30 (GMT) |
commit | f25f2e2e8c8e48490d22b0cdf67f575608701f6f (patch) | |
tree | 5357fbf7251027bd5eed255a4f22639b0119d7a7 /Modules/_sre.c | |
parent | a6241773869b80f2b1cac63f26ba646aa808a8db (diff) | |
download | cpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.zip cpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.tar.gz cpython-f25f2e2e8c8e48490d22b0cdf67f575608701f6f.tar.bz2 |
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 'Modules/_sre.c')
-rw-r--r-- | Modules/_sre.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Modules/_sre.c b/Modules/_sre.c index d863ae0..f4ec862 100644 --- a/Modules/_sre.c +++ b/Modules/_sre.c @@ -2708,7 +2708,7 @@ static PyMethodDef pattern_methods[] = { _SRE_SRE_PATTERN_SCANNER_METHODDEF _SRE_SRE_PATTERN___COPY___METHODDEF _SRE_SRE_PATTERN___DEEPCOPY___METHODDEF - {"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL, NULL} }; @@ -2764,7 +2764,7 @@ static PyMethodDef match_methods[] = { _SRE_SRE_MATCH_EXPAND_METHODDEF _SRE_SRE_MATCH___COPY___METHODDEF _SRE_SRE_MATCH___DEEPCOPY___METHODDEF - {"__class_getitem__", (PyCFunction)Py_GenericAlias, METH_O|METH_CLASS, + {"__class_getitem__", Py_GenericAlias, METH_O|METH_CLASS, PyDoc_STR("See PEP 585")}, {NULL, NULL} }; |