@@ -613,7 +613,7 @@ filter_reduce(filterobject *lz, PyObject *Py_UNUSED(ignored))
613
613
PyDoc_STRVAR (reduce_doc , "Return state information for pickling." );
614
614
615
615
static PyMethodDef filter_methods [] = {
616
- {"__reduce__" , ( PyCFunction ) filter_reduce , METH_NOARGS , reduce_doc },
616
+ {"__reduce__" , _PyCFunction_CAST ( filter_reduce ), METH_NOARGS , reduce_doc },
617
617
{NULL , NULL } /* sentinel */
618
618
};
619
619
@@ -1354,7 +1354,7 @@ map_reduce(mapobject *lz, PyObject *Py_UNUSED(ignored))
1354
1354
}
1355
1355
1356
1356
static PyMethodDef map_methods [] = {
1357
- {"__reduce__" , ( PyCFunction ) map_reduce , METH_NOARGS , reduce_doc },
1357
+ {"__reduce__" , _PyCFunction_CAST ( map_reduce ), METH_NOARGS , reduce_doc },
1358
1358
{NULL , NULL } /* sentinel */
1359
1359
};
1360
1360
@@ -2321,7 +2321,7 @@ PyDoc_STRVAR(builtin_sorted__doc__,
2321
2321
"reverse flag can be set to request the result in descending order." );
2322
2322
2323
2323
#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__},
2325
2325
2326
2326
static PyObject *
2327
2327
builtin_sorted (PyObject * self , PyObject * const * args , Py_ssize_t nargs , PyObject * kwnames )
@@ -2839,8 +2839,8 @@ zip_setstate(zipobject *lz, PyObject *state)
2839
2839
}
2840
2840
2841
2841
static 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 },
2844
2844
{NULL } /* sentinel */
2845
2845
};
2846
2846
@@ -2904,25 +2904,25 @@ PyTypeObject PyZip_Type = {
2904
2904
2905
2905
2906
2906
static PyMethodDef builtin_methods [] = {
2907
- {"__build_class__" , ( PyCFunction )( void ( * )( void )) builtin___build_class__ ,
2907
+ {"__build_class__" , _PyCFunction_CAST ( builtin___build_class__ ) ,
2908
2908
METH_FASTCALL | METH_KEYWORDS , build_class_doc },
2909
2909
BUILTIN___IMPORT___METHODDEF
2910
2910
BUILTIN_ABS_METHODDEF
2911
2911
BUILTIN_ALL_METHODDEF
2912
2912
BUILTIN_ANY_METHODDEF
2913
2913
BUILTIN_ASCII_METHODDEF
2914
2914
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 },
2916
2916
BUILTIN_CALLABLE_METHODDEF
2917
2917
BUILTIN_CHR_METHODDEF
2918
2918
BUILTIN_COMPILE_METHODDEF
2919
2919
BUILTIN_DELATTR_METHODDEF
2920
- {"dir" , builtin_dir , METH_VARARGS , dir_doc },
2920
+ {"dir" , builtin_dir , METH_VARARGS , dir_doc },
2921
2921
BUILTIN_DIVMOD_METHODDEF
2922
2922
BUILTIN_EVAL_METHODDEF
2923
2923
BUILTIN_EXEC_METHODDEF
2924
2924
BUILTIN_FORMAT_METHODDEF
2925
- {"getattr" , ( PyCFunction )( void ( * )( void )) builtin_getattr , METH_FASTCALL , getattr_doc },
2925
+ {"getattr" , _PyCFunction_CAST ( builtin_getattr ) , METH_FASTCALL , getattr_doc },
2926
2926
BUILTIN_GLOBALS_METHODDEF
2927
2927
BUILTIN_HASATTR_METHODDEF
2928
2928
BUILTIN_HASH_METHODDEF
@@ -2931,13 +2931,13 @@ static PyMethodDef builtin_methods[] = {
2931
2931
BUILTIN_INPUT_METHODDEF
2932
2932
BUILTIN_ISINSTANCE_METHODDEF
2933
2933
BUILTIN_ISSUBCLASS_METHODDEF
2934
- {"iter" , ( PyCFunction )( void ( * )( void )) builtin_iter , METH_FASTCALL , iter_doc },
2934
+ {"iter" , _PyCFunction_CAST ( builtin_iter ), METH_FASTCALL , iter_doc },
2935
2935
BUILTIN_AITER_METHODDEF
2936
2936
BUILTIN_LEN_METHODDEF
2937
2937
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 },
2941
2941
BUILTIN_ANEXT_METHODDEF
2942
2942
BUILTIN_OCT_METHODDEF
2943
2943
BUILTIN_ORD_METHODDEF
0 commit comments