Mark Dickinson <[email protected]> added the comment:
Using MEDIUM_VALUE also works.
I'll cook up a patch tonight, after work.
diff -r 6762b943ee59 Objects/longobject.c
--- a/Objects/longobject.c Tue Apr 17 21:42:07 2012 -0400
+++ b/Objects/longobject.c Fri Apr 20 13:18:01 2012 +0100
@@ -156,9 +156,7 @@
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);
----------
assignee: -> mark.dickinson
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14630>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com