Commits

mattip committed f4e2d62

fix is_valid_int for r_int and friends for untranslated testing

  • Participants
  • Parent commits 7fe38a5

Comments (0)

Files changed (1)

rpython/rlib/rarithmetic.py

 def is_valid_int(r):
     if objectmodel.we_are_translated():
         return isinstance(r, int)
-    return type(r) in (int, long, bool) and (
+    return isinstance(r, (base_int, int, long, bool)) and (
         -maxint - 1 <= r <= maxint)
 is_valid_int._annspecialcase_ = 'specialize:argtype(0)'