Author: Philip Jenvey <[email protected]>
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)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit