cpython/Objects
Tim Peters 307fa78107 SF bug #513866: Float/long comparison anomaly.
When an integer is compared to a float now, the int isn't coerced to float.
This avoids spurious overflow exceptions and insane results.  This should
compute correct results, without raising spurious exceptions, in all cases
now -- although I expect that what happens when an int/long is compared to
a NaN is still a platform accident.

Note that we had potential problems here even with "short" ints, on boxes
where sizeof(long)==8.  There's #ifdef'ed code here to handle that, but
I can't test it as intended.  I tested it by changing the #ifdef to
trigger on my 32-bit box instead.

I suppose this is a bugfix candidate, but I won't backport it.  It's
long-winded (for speed) and messy (because the problem is messy).  Note
that this also depends on a previous 2.4 patch that introduced
_Py_SwappedOp[] as an extern.
2004-09-23 08:06:40 +00:00
..
.cvsignore Ignore a bunch of generated files. 2000-05-02 18:34:30 +00:00
abstract.c SF bug #1030557: PyMapping_Check crashes when argument is NULL 2004-09-19 06:00:15 +00:00
boolobject.c - bool() called without arguments now returns False rather than 2003-04-19 18:15:10 +00:00
bufferobject.c Correct code to advance ptr to be well-formed C. 2004-03-25 16:16:28 +00:00
cellobject.c Use new GC API. 2001-08-29 23:54:21 +00:00
classobject.c A static swapped_op[] array was defined in 3 different C files, & I think 2004-09-23 02:39:37 +00:00
cobject.c Make CObjects mutable. Fixes #477441. 2003-10-19 18:30:01 +00:00
complexobject.c Fix repr for negative imaginary part. Fixes #1013908. 2004-08-22 21:09:15 +00:00
descrobject.c Use PyDict_Contains() instead of PySequence_Contains(). 2003-12-13 11:58:56 +00:00
dictnotes.txt Fix typos and add some elaborations 2004-03-15 15:52:22 +00:00
dictobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
enumobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
fileobject.c dump HAVE_FOPENRF stuff - obsolete 2004-06-11 04:49:03 +00:00
floatobject.c SF bug #513866: Float/long comparison anomaly. 2004-09-23 08:06:40 +00:00
frameobject.c SF Bug #215126: Over restricted type checking on eval() function 2004-07-02 06:41:07 +00:00
funcobject.c This is my patch 2004-08-12 18:12:44 +00:00
genobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
intobject.c Stop producing or using OverflowWarning. PEP 237 thought this would 2004-08-25 02:14:08 +00:00
iterobject.c SF patch #1020188: Use Py_CLEAR where necessary to avoid crashes 2004-09-01 07:02:44 +00:00
listobject.c SF #1022910: Conserve memory with list.pop() 2004-09-12 19:53:07 +00:00
listsort.txt Fixed new typos, added a little info about ~sort versus "hint"s. 2002-08-10 07:04:01 +00:00
longobject.c Patch #1024670: Support int objects in PyLong_AsUnsignedLong[Mask]. 2004-09-20 06:17:46 +00:00
methodobject.c * Added a new method flag, METH_COEXIST. 2003-12-13 11:26:12 +00:00
moduleobject.c Make the word "module" appear in the error string for calling the 2004-09-14 17:19:09 +00:00
object.c A static swapped_op[] array was defined in 3 different C files, & I think 2004-09-23 02:39:37 +00:00
obmalloc.c whoops, I wanted that commented out by default, will add doc to Misc 2004-06-06 19:21:34 +00:00
rangeobject.c Bug 1003935: xrange overflows 2004-08-08 07:17:39 +00:00
setobject.c Moved SunPro warning suppression into pyport.h and out of individual 2004-07-15 15:54:05 +00:00
sliceobject.c SF bug #800796: Difference between hash() and __hash__() 2003-09-05 14:27:30 +00:00
stringobject.c SF Patch #1007087: Return new string for single subclass joins (Bug #1001011) 2004-08-23 23:23:54 +00:00
structseq.c Removed all uses of the out-of-favor __safe_for_unpickling__ magic 2003-02-01 02:16:37 +00:00
tupleobject.c Add a final permutation step to the tuple hash function. 2004-06-10 18:42:15 +00:00
typeobject.c A static swapped_op[] array was defined in 3 different C files, & I think 2004-09-23 02:39:37 +00:00
unicodectype.c SF #989185: Drop unicode.iswide() and unicode.width() and add 2004-08-04 07:38:35 +00:00
unicodeobject.c Initialize sep and seplen to suppress warning from gcc. 2004-09-16 03:28:13 +00:00
unicodetype_db.h SF #989185: Drop unicode.iswide() and unicode.width() and add 2004-08-04 07:38:35 +00:00
weakrefobject.c Be more careful about maintaining the invariants; it was actually 2004-08-03 14:47:25 +00:00