diff options
author | Mark Dickinson <mdickinson@enthought.com> | 2012-04-20 20:44:09 (GMT) |
---|---|---|
committer | Mark Dickinson <mdickinson@enthought.com> | 2012-04-20 20:44:09 (GMT) |
commit | 9a359bd97f5fc0ab3ae830ad874eda6e5e76b14c (patch) | |
tree | 8bcf005c7f780b3496e5a894c9575cf5a6b59dac /Objects/longobject.c | |
parent | e28465482c19ec0bb43c1529c6fb1a823915f2d3 (diff) | |
parent | bcc17eefd2b630aca2fc0f4e27f274a028030542 (diff) | |
download | cpython-9a359bd97f5fc0ab3ae830ad874eda6e5e76b14c.zip cpython-9a359bd97f5fc0ab3ae830ad874eda6e5e76b14c.tar.gz cpython-9a359bd97f5fc0ab3ae830ad874eda6e5e76b14c.tar.bz2 |
Issue #14630: Merge fix from 3.2.
Diffstat (limited to 'Objects/longobject.c')
-rw-r--r-- | Objects/longobject.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Objects/longobject.c b/Objects/longobject.c index 0a5b9aa..3630ae4 100644 --- a/Objects/longobject.c +++ b/Objects/longobject.c @@ -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); |