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
|
@ -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…
Reference in New Issue