Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 00da4e0

Browse files
committed
Remove unneeded casts to hashfunc.
1 parent d49bf5e commit 00da4e0

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

Objects/dictobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2143,7 +2143,7 @@ PyTypeObject PyDict_Type = {
21432143
0, /* tp_as_number */
21442144
&dict_as_sequence, /* tp_as_sequence */
21452145
&dict_as_mapping, /* tp_as_mapping */
2146-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
2146+
PyObject_HashNotImplemented, /* tp_hash */
21472147
0, /* tp_call */
21482148
0, /* tp_str */
21492149
PyObject_GenericGetAttr, /* tp_getattro */

Objects/listobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2596,7 +2596,7 @@ PyTypeObject PyList_Type = {
25962596
0, /* tp_as_number */
25972597
&list_as_sequence, /* tp_as_sequence */
25982598
&list_as_mapping, /* tp_as_mapping */
2599-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
2599+
PyObject_HashNotImplemented, /* tp_hash */
26002600
0, /* tp_call */
26012601
0, /* tp_str */
26022602
PyObject_GenericGetAttr, /* tp_getattro */

Objects/setobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2114,7 +2114,7 @@ PyTypeObject PySet_Type = {
21142114
&set_as_number, /* tp_as_number */
21152115
&set_as_sequence, /* tp_as_sequence */
21162116
0, /* tp_as_mapping */
2117-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
2117+
PyObject_HashNotImplemented, /* tp_hash */
21182118
0, /* tp_call */
21192119
0, /* tp_str */
21202120
PyObject_GenericGetAttr, /* tp_getattro */
@@ -2126,8 +2126,8 @@ PyTypeObject PySet_Type = {
21262126
(traverseproc)set_traverse, /* tp_traverse */
21272127
(inquiry)set_clear_internal, /* tp_clear */
21282128
(richcmpfunc)set_richcompare, /* tp_richcompare */
2129-
offsetof(PySetObject, weakreflist), /* tp_weaklistoffset */
2130-
(getiterfunc)set_iter, /* tp_iter */
2129+
offsetof(PySetObject, weakreflist), /* tp_weaklistoffset */
2130+
(getiterfunc)set_iter, /* tp_iter */
21312131
0, /* tp_iternext */
21322132
set_methods, /* tp_methods */
21332133
0, /* tp_members */

0 commit comments

Comments
 (0)