Author: Alex Gaynor <[email protected]>
Branch: numpy-record-dtypes
Changeset: r53169:7e4c821d088f
Date: 2012-03-03 22:47 -0500
http://bitbucket.org/pypy/pypy/changeset/7e4c821d088f/
Log: slightly cleaner
diff --git a/pypy/rlib/rarithmetic.py b/pypy/rlib/rarithmetic.py
--- a/pypy/rlib/rarithmetic.py
+++ b/pypy/rlib/rarithmetic.py
@@ -521,9 +521,8 @@
from pypy.rpython.lltypesystem import lltype, rffi
T = lltype.typeOf(arg)
- if T != rffi.LONGLONG and T != rffi.ULONGLONG and T != rffi.UINT:
- arg = rffi.cast(lltype.Signed, arg)
- # XXX we cannot do arithmetics on small ints
+ # XXX we cannot do arithmetics on small ints
+ arg = widen(arg)
if rffi.sizeof(T) == 1:
res = arg
elif rffi.sizeof(T) == 2:
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit