[Checkins] SVN: Products.ZopeVersionControl/trunk/ Make sure we cast MAX32 to an int, as ``2**31`` would be automatically overflow to a long on 32bit Python's.

Hanno Schlichting hannosch at hannosch.eu
Thu Aug 5 11:37:18 EDT 2010


Log message for revision 115498:
  Make sure we cast MAX32 to an int, as ``2**31`` would be automatically overflow to a long on 32bit Python's.
  

Changed:
  U   Products.ZopeVersionControl/trunk/CHANGES.txt
  U   Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/EventLog.py
  U   Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/VersionHistory.py

-=-
Modified: Products.ZopeVersionControl/trunk/CHANGES.txt
===================================================================
--- Products.ZopeVersionControl/trunk/CHANGES.txt	2010-08-05 15:19:41 UTC (rev 115497)
+++ Products.ZopeVersionControl/trunk/CHANGES.txt	2010-08-05 15:37:18 UTC (rev 115498)
@@ -1,9 +1,11 @@
 Changelog
 =========
 
-1.1.2 - unreleased
+1.1.2 - 2010-08-05
 ------------------
 
+- Make sure we cast MAX32 to an int, as ``2**31`` would be automatically
+  overflow to a long on 32bit Python's.
 
 1.1.1 - 2010-08-04
 ------------------

Modified: Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/EventLog.py
===================================================================
--- Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/EventLog.py	2010-08-05 15:19:41 UTC (rev 115497)
+++ Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/EventLog.py	2010-08-05 15:37:18 UTC (rev 115498)
@@ -18,7 +18,7 @@
 from Utility import _findUserId
 import time
 
-MAX32 = 2**31 - 1
+MAX32 = int(2**31 - 1)
 
 
 class EventLog(Persistent):

Modified: Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/VersionHistory.py
===================================================================
--- Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/VersionHistory.py	2010-08-05 15:19:41 UTC (rev 115497)
+++ Products.ZopeVersionControl/trunk/Products/ZopeVersionControl/VersionHistory.py	2010-08-05 15:37:18 UTC (rev 115498)
@@ -25,7 +25,7 @@
 from Acquisition import Implicit
 import time
 
-MAX32 = 2**31 - 1
+MAX32 = int(2**31 - 1)
 
 
 class VersionHistory(Implicit, Persistent):



More information about the checkins mailing list