[pypy-commit] pypy py3k: move py3's isfinite into rcomplex with the rest of the impls

pjenvey noreply at buildbot.pypy.org
Thu Oct 11 02:14:59 CEST 2012


Author: Philip Jenvey <pjenvey at underboss.org>
Branch: py3k
Changeset: r58003:b8c3b51ce509
Date: 2012-10-10 17:15 -0700
http://bitbucket.org/pypy/pypy/changeset/b8c3b51ce509/

Log:	move py3's isfinite into rcomplex with the rest of the impls

diff --git a/pypy/module/cmath/interp_cmath.py b/pypy/module/cmath/interp_cmath.py
--- a/pypy/module/cmath/interp_cmath.py
+++ b/pypy/module/cmath/interp_cmath.py
@@ -4,7 +4,6 @@
 from pypy.interpreter.error import OperationError
 from pypy.interpreter.gateway import NoneNotWrapped
 from pypy.module.cmath import names_and_docstrings
-from pypy.rlib.rfloat import isfinite
 from pypy.rlib import rcomplex
 
 pi = math.pi
@@ -171,7 +170,7 @@
 wrapped_isnan.func_doc = names_and_docstrings['isnan']
 
 def c_isfinite(x, y):
-    return isfinite(x) and isfinite(y)
+    return rcomplex.c_isfinite(x, y)
 
 def wrapped_isfinite(space, w_z):
     x, y = space.unpackcomplex(w_z)
diff --git a/pypy/rlib/rcomplex.py b/pypy/rlib/rcomplex.py
--- a/pypy/rlib/rcomplex.py
+++ b/pypy/rlib/rcomplex.py
@@ -563,3 +563,6 @@
 def c_isnan(r, i):
     return isnan(r) or isnan(i)
 
+
+def c_isfinite(r, i):
+    return isfinite(r) and isfinite(i)


More information about the pypy-commit mailing list