[New-bugs-announce] [issue27786] longobject.c: simplify x_sub(), inline _PyLong_Negate()

STINNER Victor report at bugs.python.org
Wed Aug 17 09:17:12 EDT 2016


New submission from STINNER Victor:

When reading the issue #27725, I saw that x_sub() of Objects/longobject.c is too careful just to change the sign of the newly created number: z cannot be shared at the end of the function, before z is normalized.

Attached patch simplifies the code.

See also the issue #27073, another similar simplification.

----------
files: x_sub.patch
keywords: patch
messages: 272933
nosy: haypo, mark.dickinson, serhiy.storchaka
priority: normal
severity: normal
status: open
title: longobject.c: simplify x_sub(), inline _PyLong_Negate()
versions: Python 3.6
Added file: http://bugs.python.org/file44132/x_sub.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27786>
_______________________________________


More information about the New-bugs-announce mailing list