[pypy-commit] pypy default: don't widen floats

fijal noreply at buildbot.pypy.org
Mon Mar 19 10:21:03 CET 2012


Author: Maciej Fijalkowski <fijall at gmail.com>
Branch: 
Changeset: r53798:1de751aac608
Date: 2012-03-19 11:18 +0200
http://bitbucket.org/pypy/pypy/changeset/1de751aac608/

Log:	don't widen floats

diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -578,7 +578,8 @@
     
     T = lltype.typeOf(arg)
     # XXX we cannot do arithmetics on small ints
-    arg = widen(arg)
+    if isinstance(arg, base_int):
+        arg = widen(arg)
     if rffi.sizeof(T) == 1:
         res = arg
     elif rffi.sizeof(T) == 2:


More information about the pypy-commit mailing list