Commits

Christian Tismer committed 53b5e00

a few more int/long unifications.
XXX I think this should be replaced by a range checking function.

Comments (0)

Files changed (3)

pypy/annotation/builtin.py

                         r.const = False
                 return r
                 
-            assert not issubclass(typ, (int, long)) or typ in (bool, int), (
+            assert not issubclass(typ, (int, long)) or typ in (bool, int, long), (
                 "for integers only isinstance(.,int|r_uint) are supported")
  
             if s_obj.is_constant():

pypy/interpreter/test/test_compiler.py

     def test_tuple_constants(self):
         ns = {}
         exec "x = (1, 0); y = (1L, 0L)" in ns
-        assert isinstance(ns["x"][0], int)
+        assert isinstance(ns["x"][0], (int, long))
         assert isinstance(ns["y"][0], long)
 
     def test_division_folding(self):

pypy/rpython/test/test_rbuiltin.py

         if r_longlong is not r_int:
             assert isinstance(res, r_longlong)
         else:
-            assert isinstance(res, int)
+            assert isinstance(res, (int, long))
         #
         def llfn(v):
             return rffi.cast(rffi.ULONGLONG, v)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.