[pypy-commit] pypy default: get size of long double using rfficache instead of ctypes.sizeof
bivab
noreply at buildbot.pypy.org
Tue Apr 30 17:43:12 CEST 2013
Author: David Schneider <david.schneider at picle.org>
Branch:
Changeset: r63770:b7810d45dff1
Date: 2013-04-30 17:41 +0200
http://bitbucket.org/pypy/pypy/changeset/b7810d45dff1/
Log: get size of long double using rfficache instead of ctypes.sizeof
diff --git a/rpython/rtyper/lltypesystem/rffi.py b/rpython/rtyper/lltypesystem/rffi.py
--- a/rpython/rtyper/lltypesystem/rffi.py
+++ b/rpython/rtyper/lltypesystem/rffi.py
@@ -934,8 +934,8 @@
if tp is lltype.SingleFloat:
return 4
if tp is lltype.LongFloat:
- import ctypes # :-/
- return ctypes.sizeof(ctypes.c_longdouble)
+ # :-/
+ return sizeof_c_type("long double")
assert isinstance(tp, lltype.Number)
if tp is lltype.Signed:
return LONG_BIT/8
More information about the pypy-commit
mailing list