mirror of
https://github.com/python/cpython.git
synced 2025-08-01 23:53:15 +00:00
bpo-36379: __ipow__ must be a ternaryfunc, not a binaryfunc (GH-13546)
If a type's __ipow__ method was implemented in C, attempting to use the *modulo* parameter would cause crashes. https://bugs.python.org/issue36379
This commit is contained in:
parent
c7f7069e77
commit
c7f803b08e
4 changed files with 36 additions and 1 deletions
|
@ -7016,7 +7016,7 @@ static slotdef slotdefs[] = {
|
|||
IBSLOT("__imod__", nb_inplace_remainder, slot_nb_inplace_remainder,
|
||||
wrap_binaryfunc, "%="),
|
||||
IBSLOT("__ipow__", nb_inplace_power, slot_nb_inplace_power,
|
||||
wrap_binaryfunc, "**="),
|
||||
wrap_ternaryfunc, "**="),
|
||||
IBSLOT("__ilshift__", nb_inplace_lshift, slot_nb_inplace_lshift,
|
||||
wrap_binaryfunc, "<<="),
|
||||
IBSLOT("__irshift__", nb_inplace_rshift, slot_nb_inplace_rshift,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue