Issue #27441: Remove some redundant assignments to ob_size in longobject.c. Thanks Oren Milman.
This commit is contained in:
parent
92ca535626
commit
fba121fe9d
@ -10,6 +10,9 @@ What's New in Python 3.7.0 alpha 1
|
|||||||
Core and Builtins
|
Core and Builtins
|
||||||
-----------------
|
-----------------
|
||||||
|
|
||||||
|
- Issue #27441: Remove some redundant assignments to ob_size in longobject.c.
|
||||||
|
Thanks Oren Milman.
|
||||||
|
|
||||||
- Issue #27222: Clean up redundant code in long_rshift function. Thanks
|
- Issue #27222: Clean up redundant code in long_rshift function. Thanks
|
||||||
Oren Milman.
|
Oren Milman.
|
||||||
|
|
||||||
|
@ -315,7 +315,6 @@ PyLong_FromUnsignedLong(unsigned long ival)
|
|||||||
v = _PyLong_New(ndigits);
|
v = _PyLong_New(ndigits);
|
||||||
if (v != NULL) {
|
if (v != NULL) {
|
||||||
digit *p = v->ob_digit;
|
digit *p = v->ob_digit;
|
||||||
Py_SIZE(v) = ndigits;
|
|
||||||
while (ival) {
|
while (ival) {
|
||||||
*p++ = (digit)(ival & PyLong_MASK);
|
*p++ = (digit)(ival & PyLong_MASK);
|
||||||
ival >>= PyLong_SHIFT;
|
ival >>= PyLong_SHIFT;
|
||||||
@ -1102,7 +1101,6 @@ PyLong_FromUnsignedLongLong(unsigned long long ival)
|
|||||||
v = _PyLong_New(ndigits);
|
v = _PyLong_New(ndigits);
|
||||||
if (v != NULL) {
|
if (v != NULL) {
|
||||||
digit *p = v->ob_digit;
|
digit *p = v->ob_digit;
|
||||||
Py_SIZE(v) = ndigits;
|
|
||||||
while (ival) {
|
while (ival) {
|
||||||
*p++ = (digit)(ival & PyLong_MASK);
|
*p++ = (digit)(ival & PyLong_MASK);
|
||||||
ival >>= PyLong_SHIFT;
|
ival >>= PyLong_SHIFT;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user