diff options
author | Zackery Spytz <zspytz@gmail.com> | 2019-05-31 09:46:36 (GMT) |
---|---|---|
committer | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2019-05-31 09:46:36 (GMT) |
commit | c7f803b08ed5211701c75f98ba9ada85d45ac155 (patch) | |
tree | a283b57dae8d45875c48b3143a11aef601fb3d9f /Objects | |
parent | c7f7069e77c58e83b847c0bfe4d5aadf6add2e68 (diff) | |
download | cpython-c7f803b08ed5211701c75f98ba9ada85d45ac155.zip cpython-c7f803b08ed5211701c75f98ba9ada85d45ac155.tar.gz cpython-c7f803b08ed5211701c75f98ba9ada85d45ac155.tar.bz2 |
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
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/typeobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/typeobject.c b/Objects/typeobject.c index 64c2cea..b6d925c 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -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, |