mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #27786: Simplify x_sub()
The z variable is known to be a fresh number which cannot be shared, Py_SIZE() can be used directly to negate the number.
This commit is contained in:
parent
82df3b3071
commit
8bcf312d09
1 changed files with 1 additions and 3 deletions
|
@ -3000,9 +3000,7 @@ x_sub(PyLongObject *a, PyLongObject *b)
|
|||
}
|
||||
assert(borrow == 0);
|
||||
if (sign < 0) {
|
||||
_PyLong_Negate(&z);
|
||||
if (z == NULL)
|
||||
return NULL;
|
||||
Py_SIZE(z) = -Py_SIZE(z);
|
||||
}
|
||||
return long_normalize(z);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue