[Python-Dev] issues with int/long on 64bit platforms - eg stringobject (PR#306)

M.-A. Lemburg mal@lemburg.com
Mon, 01 May 2000 12:55:52 +0200

I've just posted a simple patch to the patches list which
implements the idea I posted earlier:

Silent truncation still takes place, but in a somwhat more
natural way ;-) ...

                       /* Silently truncate to INT_MAX/INT_MIN to
                          make passing sys.maxint to 'i' parser
                          markers work on 64-bit platforms work just
                          like on 32-bit platforms. Overflow errors
                          are not raised. */
                       else if (ival > INT_MAX)
                               ival = INT_MAX;
                       else if (ival < INT_MIN)
                               ival = INT_MIN;
                       *p = ival;

Marc-Andre Lemburg
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/