Author: Matti Picus <[email protected]>
Branch: 
Changeset: r61730:f4e2d6247ba9
Date: 2013-02-24 17:27 +0200
http://bitbucket.org/pypy/pypy/changeset/f4e2d6247ba9/

Log:    fix is_valid_int for r_int and friends for untranslated testing

diff --git a/rpython/rlib/rarithmetic.py b/rpython/rlib/rarithmetic.py
--- a/rpython/rlib/rarithmetic.py
+++ b/rpython/rlib/rarithmetic.py
@@ -157,7 +157,7 @@
 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)'
 
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to