@@ -613,7 +613,7 @@ filter_reduce(filterobject *lz, PyObject *Py_UNUSED(ignored))
613613PyDoc_STRVAR (reduce_doc , "Return state information for pickling." );
614614
615615static PyMethodDef filter_methods [] = {
616- {"__reduce__" , ( PyCFunction ) filter_reduce , METH_NOARGS , reduce_doc },
616+ {"__reduce__" , _PyCFunction_CAST ( filter_reduce ), METH_NOARGS , reduce_doc },
617617 {NULL , NULL } /* sentinel */
618618};
619619
@@ -1354,7 +1354,7 @@ map_reduce(mapobject *lz, PyObject *Py_UNUSED(ignored))
13541354}
13551355
13561356static PyMethodDef map_methods [] = {
1357- {"__reduce__" , ( PyCFunction ) map_reduce , METH_NOARGS , reduce_doc },
1357+ {"__reduce__" , _PyCFunction_CAST ( map_reduce ), METH_NOARGS , reduce_doc },
13581358 {NULL , NULL } /* sentinel */
13591359};
13601360
@@ -2321,7 +2321,7 @@ PyDoc_STRVAR(builtin_sorted__doc__,
23212321"reverse flag can be set to request the result in descending order." );
23222322
23232323#define BUILTIN_SORTED_METHODDEF \
2324- {"sorted", (PyCFunction)(void(*)(void)) builtin_sorted, METH_FASTCALL | METH_KEYWORDS, builtin_sorted__doc__},
2324+ {"sorted", _PyCFunction_CAST( builtin_sorted) , METH_FASTCALL | METH_KEYWORDS, builtin_sorted__doc__},
23252325
23262326static PyObject *
23272327builtin_sorted (PyObject * self , PyObject * const * args , Py_ssize_t nargs , PyObject * kwnames )
@@ -2839,8 +2839,8 @@ zip_setstate(zipobject *lz, PyObject *state)
28392839}
28402840
28412841static PyMethodDef zip_methods [] = {
2842- {"__reduce__" , ( PyCFunction ) zip_reduce , METH_NOARGS , reduce_doc },
2843- {"__setstate__" , ( PyCFunction ) zip_setstate , METH_O , setstate_doc },
2842+ {"__reduce__" , _PyCFunction_CAST ( zip_reduce ), METH_NOARGS , reduce_doc },
2843+ {"__setstate__" , _PyCFunction_CAST ( zip_setstate ) , METH_O , setstate_doc },
28442844 {NULL } /* sentinel */
28452845};
28462846
@@ -2904,25 +2904,25 @@ PyTypeObject PyZip_Type = {
29042904
29052905
29062906static PyMethodDef builtin_methods [] = {
2907- {"__build_class__" , ( PyCFunction )( void ( * )( void )) builtin___build_class__ ,
2907+ {"__build_class__" , _PyCFunction_CAST ( builtin___build_class__ ) ,
29082908 METH_FASTCALL | METH_KEYWORDS , build_class_doc },
29092909 BUILTIN___IMPORT___METHODDEF
29102910 BUILTIN_ABS_METHODDEF
29112911 BUILTIN_ALL_METHODDEF
29122912 BUILTIN_ANY_METHODDEF
29132913 BUILTIN_ASCII_METHODDEF
29142914 BUILTIN_BIN_METHODDEF
2915- {"breakpoint" , ( PyCFunction )( void ( * )( void )) builtin_breakpoint , METH_FASTCALL | METH_KEYWORDS , breakpoint_doc },
2915+ {"breakpoint" , _PyCFunction_CAST ( builtin_breakpoint ) , METH_FASTCALL | METH_KEYWORDS , breakpoint_doc },
29162916 BUILTIN_CALLABLE_METHODDEF
29172917 BUILTIN_CHR_METHODDEF
29182918 BUILTIN_COMPILE_METHODDEF
29192919 BUILTIN_DELATTR_METHODDEF
2920- {"dir" , builtin_dir , METH_VARARGS , dir_doc },
2920+ {"dir" , builtin_dir , METH_VARARGS , dir_doc },
29212921 BUILTIN_DIVMOD_METHODDEF
29222922 BUILTIN_EVAL_METHODDEF
29232923 BUILTIN_EXEC_METHODDEF
29242924 BUILTIN_FORMAT_METHODDEF
2925- {"getattr" , ( PyCFunction )( void ( * )( void )) builtin_getattr , METH_FASTCALL , getattr_doc },
2925+ {"getattr" , _PyCFunction_CAST ( builtin_getattr ) , METH_FASTCALL , getattr_doc },
29262926 BUILTIN_GLOBALS_METHODDEF
29272927 BUILTIN_HASATTR_METHODDEF
29282928 BUILTIN_HASH_METHODDEF
@@ -2931,13 +2931,13 @@ static PyMethodDef builtin_methods[] = {
29312931 BUILTIN_INPUT_METHODDEF
29322932 BUILTIN_ISINSTANCE_METHODDEF
29332933 BUILTIN_ISSUBCLASS_METHODDEF
2934- {"iter" , ( PyCFunction )( void ( * )( void )) builtin_iter , METH_FASTCALL , iter_doc },
2934+ {"iter" , _PyCFunction_CAST ( builtin_iter ), METH_FASTCALL , iter_doc },
29352935 BUILTIN_AITER_METHODDEF
29362936 BUILTIN_LEN_METHODDEF
29372937 BUILTIN_LOCALS_METHODDEF
2938- {"max" , ( PyCFunction )( void ( * )( void )) builtin_max , METH_VARARGS | METH_KEYWORDS , max_doc },
2939- {"min" , ( PyCFunction )( void ( * )( void )) builtin_min , METH_VARARGS | METH_KEYWORDS , min_doc },
2940- {"next" , ( PyCFunction )( void ( * )( void )) builtin_next , METH_FASTCALL , next_doc },
2938+ {"max" , _PyCFunction_CAST ( builtin_max ), METH_VARARGS | METH_KEYWORDS , max_doc },
2939+ {"min" , _PyCFunction_CAST ( builtin_min ), METH_VARARGS | METH_KEYWORDS , min_doc },
2940+ {"next" , _PyCFunction_CAST ( builtin_next ), METH_FASTCALL , next_doc },
29412941 BUILTIN_ANEXT_METHODDEF
29422942 BUILTIN_OCT_METHODDEF
29432943 BUILTIN_ORD_METHODDEF
0 commit comments