Issue #14630: Merge fix from 3.2.

This commit is contained in:
Mark Dickinson 2012-04-20 21:44:09 +01:00
commit 9a359bd97f
3 changed files with 18 additions and 3 deletions

View file

@ -156,9 +156,7 @@ _PyLong_Copy(PyLongObject *src)
if (i < 0)
i = -(i);
if (i < 2) {
sdigit ival = src->ob_digit[0];
if (Py_SIZE(src) < 0)
ival = -ival;
sdigit ival = MEDIUM_VALUE(src);
CHECK_SMALL_INT(ival);
}
result = _PyLong_New(i);