Message29645
Logged In: YES
user_id=403009
The was a few other comments from the gcc developers on the proposed
fix...
http://gcc.gnu.org/ml/gcc/2006-08/msg00448.html
http://gcc.gnu.org/ml/gcc/2006-08/msg00449.html
...so that since x is a long the more correct fix is...
--- Python-2.4.3/Objects/intobject.c.org 2006-08-24
07:06:51.000000000 -0400
+++ Python-2.4.3/Objects/intobject.c 2006-08-24 07:08:06.000000000
-0400
@@ -479,7 +479,7 @@
return DIVMOD_ERROR;
}
/* (-sys.maxint-1)/-1 is the only overflow case. */
- if (y == -1 && x < 0 && x == -x)
+ if (y == -1 && x < 0 && ((unsigned long)x) == -(unsigned long)x)
return DIVMOD_OVERFLOW;
xdivy = x / y;
xmody = x - xdivy * y;
I have tested this form of the patch and it works as well. My main concern is
that we get this fix in python 2.5 before release. Jack, could you reassign this
to the person you think might be most appropriate out of the list of python
developers? I really should be a pretty simple review for the patch.
|
|
| Date |
User |
Action |
Args |
| 2007-08-23 14:42:16 | admin | link | issue1545668 messages |
| 2007-08-23 14:42:16 | admin | create | |
|