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);
|
assert(borrow == 0);
|
||||||
if (sign < 0) {
|
if (sign < 0) {
|
||||||
_PyLong_Negate(&z);
|
Py_SIZE(z) = -Py_SIZE(z);
|
||||||
if (z == NULL)
|
|
||||||
return NULL;
|
|
||||||
}
|
}
|
||||||
return long_normalize(z);
|
return long_normalize(z);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user