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

Skip to content

Commit f038b32

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

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

Modules/_collectionsmodule.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,24 +1016,24 @@ static PyTypeObject deque_type = {
10161016
0, /* tp_as_number */
10171017
&deque_as_sequence, /* tp_as_sequence */
10181018
0, /* tp_as_mapping */
1019-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
1019+
PyObject_HashNotImplemented, /* tp_hash */
10201020
0, /* tp_call */
10211021
0, /* tp_str */
10221022
PyObject_GenericGetAttr, /* tp_getattro */
10231023
0, /* tp_setattro */
10241024
0, /* tp_as_buffer */
10251025
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE | Py_TPFLAGS_HAVE_GC,
1026-
/* tp_flags */
1026+
/* tp_flags */
10271027
deque_doc, /* tp_doc */
10281028
(traverseproc)deque_traverse, /* tp_traverse */
10291029
(inquiry)deque_clear, /* tp_clear */
10301030
(richcmpfunc)deque_richcompare, /* tp_richcompare */
1031-
offsetof(dequeobject, weakreflist), /* tp_weaklistoffset*/
1031+
offsetof(dequeobject, weakreflist), /* tp_weaklistoffset*/
10321032
(getiterfunc)deque_iter, /* tp_iter */
10331033
0, /* tp_iternext */
10341034
deque_methods, /* tp_methods */
10351035
0, /* tp_members */
1036-
deque_getset, /* tp_getset */
1036+
deque_getset, /* tp_getset */
10371037
0, /* tp_base */
10381038
0, /* tp_dict */
10391039
0, /* tp_descr_get */

Modules/_pickle.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3570,7 +3570,7 @@ static PyTypeObject PicklerMemoProxyType = {
35703570
0, /* tp_as_number */
35713571
0, /* tp_as_sequence */
35723572
0, /* tp_as_mapping */
3573-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
3573+
PyObject_HashNotImplemented, /* tp_hash */
35743574
0, /* tp_call */
35753575
0, /* tp_str */
35763576
PyObject_GenericGetAttr, /* tp_getattro */
@@ -5708,7 +5708,7 @@ static PyTypeObject UnpicklerMemoProxyType = {
57085708
0, /* tp_as_number */
57095709
0, /* tp_as_sequence */
57105710
0, /* tp_as_mapping */
5711-
(hashfunc)PyObject_HashNotImplemented, /* tp_hash */
5711+
PyObject_HashNotImplemented, /* tp_hash */
57125712
0, /* tp_call */
57135713
0, /* tp_str */
57145714
PyObject_GenericGetAttr, /* tp_getattro */

0 commit comments

Comments
 (0)