[pypy-commit] pypy default: Use a consistent style and avoid intmask()
arigo
noreply at buildbot.pypy.org
Wed Jul 17 13:51:14 CEST 2013
Author: Armin Rigo <arigo at tunes.org>
Branch:
Changeset: r65431:c60b161838a3
Date: 2013-07-17 12:35 +0200
http://bitbucket.org/pypy/pypy/changeset/c60b161838a3/
Log: Use a consistent style and avoid intmask()
diff --git a/pypy/module/__pypy__/interp_intop.py b/pypy/module/__pypy__/interp_intop.py
--- a/pypy/module/__pypy__/interp_intop.py
+++ b/pypy/module/__pypy__/interp_intop.py
@@ -1,20 +1,19 @@
from pypy.interpreter.gateway import unwrap_spec
-from rpython.rlib.rarithmetic import intmask
from rpython.rtyper.lltypesystem import lltype
from rpython.rtyper.lltypesystem.lloperation import llop
@unwrap_spec(n=int, m=int)
def int_add(space, n, m):
- return space.wrap(intmask(n + m))
+ return space.wrap(llop.int_add(lltype.Signed, n, m))
@unwrap_spec(n=int, m=int)
def int_sub(space, n, m):
- return space.wrap(intmask(n - m))
+ return space.wrap(llop.int_sub(lltype.Signed, n, m))
@unwrap_spec(n=int, m=int)
def int_mul(space, n, m):
- return space.wrap(intmask(n * m))
+ return space.wrap(llop.int_mul(lltype.Signed, n, m))
@unwrap_spec(n=int, m=int)
def int_floordiv(space, n, m):
More information about the pypy-commit
mailing list