summaryrefslogtreecommitdiff
blob: 6d5ff2042af5b9fcac6dceb354c423c7295e2364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff -ur gazpacho-0.6.2-orig/gazpacho/kiwiutils.py gazpacho-0.6.2/gazpacho/kiwiutils.py
--- gazpacho-0.6.2-orig/gazpacho/kiwiutils.py	2006-01-10 04:12:40.314703200 -0800
+++ gazpacho-0.6.2/gazpacho/kiwiutils.py	2006-01-10 04:14:57.228889080 -0800
@@ -22,6 +22,7 @@
 #            Johan Dahlin <jdahlin@async.com.br>
 #
 
+import struct
 import sys
 
 import gobject
@@ -189,9 +190,12 @@
     
         dict[name] = (flags, retval, args)
 
-_MAX_INT = sys.maxint
-_MAX_FLOAT = 1e+308
-_MAX_LONG = 18446744073709551616L
+def _max(c):
+   return (1 << (8 * struct.calcsize(c)-1))-1
+
+_MAX_INT = int(_max('i'))
+_MAX_FLOAT = float(_max('f'))
+_MAX_LONG = long(_max('l'))
 
 def gproperty(name, type, *args, **kwargs):
     """
Only in gazpacho-0.6.2/gazpacho: kiwiutils.py.orig