[pypy-svn] r75825 - pypy/trunk/pypy/rlib
fijal at codespeak.net
fijal at codespeak.net
Mon Jul 5 00:01:08 CEST 2010
Author: fijal
Date: Mon Jul 5 00:01:07 2010
New Revision: 75825
Modified:
pypy/trunk/pypy/rlib/libffi.py
pypy/trunk/pypy/rlib/rarithmetic.py
pypy/trunk/pypy/rlib/rlocale.py
Log:
Simplify isnan and isinf to something sane. Python 2.3 required that, but
we don't support it any more (yay)
Modified: pypy/trunk/pypy/rlib/libffi.py
==============================================================================
--- pypy/trunk/pypy/rlib/libffi.py (original)
+++ pypy/trunk/pypy/rlib/libffi.py Mon Jul 5 00:01:07 2010
@@ -402,7 +402,7 @@
restype = ffi_type_sint32
elif restype.c_size <= 8:
restype = ffi_type_sint64
-
+
res = c_ffi_prep_cif(self.ll_cif, cc,
rffi.cast(rffi.UINT, argnum), restype,
self.ll_argtypes)
Modified: pypy/trunk/pypy/rlib/rarithmetic.py
==============================================================================
--- pypy/trunk/pypy/rlib/rarithmetic.py (original)
+++ pypy/trunk/pypy/rlib/rarithmetic.py Mon Jul 5 00:01:07 2010
@@ -54,13 +54,10 @@
NAN = INFINITY / INFINITY
def isinf(x):
- return x != 0.0 and x / 2 == x
+ return x == INFINITY or x == -INFINITY
-# To get isnan, working x-platform and both on 2.3 and 2.4, is a
-# horror. I think this works (for reasons I don't really want to talk
-# about), and probably when implemented on top of pypy, too.
def isnan(v):
- return v != v*1.0 or (v == 1.0 and v == 2.0)
+ return v != v
def intmask(n):
if isinstance(n, int):
Modified: pypy/trunk/pypy/rlib/rlocale.py
==============================================================================
--- pypy/trunk/pypy/rlib/rlocale.py (original)
+++ pypy/trunk/pypy/rlib/rlocale.py Mon Jul 5 00:01:07 2010
@@ -13,15 +13,15 @@
self.message = message
HAVE_LANGINFO = sys.platform != 'win32'
-HAVE_LIBINTL = sys.platform != 'win32'
+#HAVE_LIBINTL = sys.platform != 'win32'
class CConfig:
includes = ['locale.h', 'limits.h']
if HAVE_LANGINFO:
includes += ['langinfo.h']
- if HAVE_LIBINTL:
- includes += ['libintl.h']
+ #if HAVE_LIBINTL:
+ # includes += ['libintl.h']
if sys.platform == 'win32':
includes += ['windows.h']
_compilation_info_ = ExternalCompilationInfo(
More information about the Pypy-commit
mailing list