bpo-33012: Fix more invalid function cast warnings with gcc 8. (GH-10751)
Fix warnings with gcc 8 for wrapperfunc <-> wrapperfunc_kwds casts.
(cherry picked from commit 1c607155c9
)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
This commit is contained in:
parent
7eeab87263
commit
1659c08d5d
|
@ -344,7 +344,7 @@ wrapperdescr_raw_call(PyWrapperDescrObject *descr, PyObject *self,
|
||||||
wrapperfunc wrapper = descr->d_base->wrapper;
|
wrapperfunc wrapper = descr->d_base->wrapper;
|
||||||
|
|
||||||
if (descr->d_base->flags & PyWrapperFlag_KEYWORDS) {
|
if (descr->d_base->flags & PyWrapperFlag_KEYWORDS) {
|
||||||
wrapperfunc_kwds wk = (wrapperfunc_kwds)wrapper;
|
wrapperfunc_kwds wk = (wrapperfunc_kwds)(void(*)(void))wrapper;
|
||||||
return (*wk)(self, args, descr->d_wrapped, kwds);
|
return (*wk)(self, args, descr->d_wrapped, kwds);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -6794,7 +6794,7 @@ static slotdef slotdefs[] = {
|
||||||
"__repr__($self, /)\n--\n\nReturn repr(self)."),
|
"__repr__($self, /)\n--\n\nReturn repr(self)."),
|
||||||
TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
|
TPSLOT("__hash__", tp_hash, slot_tp_hash, wrap_hashfunc,
|
||||||
"__hash__($self, /)\n--\n\nReturn hash(self)."),
|
"__hash__($self, /)\n--\n\nReturn hash(self)."),
|
||||||
FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)wrap_call,
|
FLSLOT("__call__", tp_call, slot_tp_call, (wrapperfunc)(void(*)(void))wrap_call,
|
||||||
"__call__($self, /, *args, **kwargs)\n--\n\nCall self as a function.",
|
"__call__($self, /, *args, **kwargs)\n--\n\nCall self as a function.",
|
||||||
PyWrapperFlag_KEYWORDS),
|
PyWrapperFlag_KEYWORDS),
|
||||||
TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
|
TPSLOT("__str__", tp_str, slot_tp_str, wrap_unaryfunc,
|
||||||
|
@ -6830,7 +6830,7 @@ static slotdef slotdefs[] = {
|
||||||
TPSLOT("__delete__", tp_descr_set, slot_tp_descr_set,
|
TPSLOT("__delete__", tp_descr_set, slot_tp_descr_set,
|
||||||
wrap_descr_delete,
|
wrap_descr_delete,
|
||||||
"__delete__($self, instance, /)\n--\n\nDelete an attribute of instance."),
|
"__delete__($self, instance, /)\n--\n\nDelete an attribute of instance."),
|
||||||
FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)wrap_init,
|
FLSLOT("__init__", tp_init, slot_tp_init, (wrapperfunc)(void(*)(void))wrap_init,
|
||||||
"__init__($self, /, *args, **kwargs)\n--\n\n"
|
"__init__($self, /, *args, **kwargs)\n--\n\n"
|
||||||
"Initialize self. See help(type(self)) for accurate signature.",
|
"Initialize self. See help(type(self)) for accurate signature.",
|
||||||
PyWrapperFlag_KEYWORDS),
|
PyWrapperFlag_KEYWORDS),
|
||||||
|
|
Loading…
Reference in New Issue