[pypy-commit] pypy default: Add kind == '?'.

arigo noreply at buildbot.pypy.org
Mon Aug 13 10:10:41 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r56718:dbcaebc93dbd
Date: 2012-08-13 10:10 +0200
http://bitbucket.org/pypy/pypy/changeset/dbcaebc93dbd/

Log:	Add kind == '?'.

diff --git a/pypy/jit/backend/llsupport/ffisupport.py b/pypy/jit/backend/llsupport/ffisupport.py
--- a/pypy/jit/backend/llsupport/ffisupport.py
+++ b/pypy/jit/backend/llsupport/ffisupport.py
@@ -29,7 +29,7 @@
     if ((not cpu.supports_floats and kind == 'f') or
         (not cpu.supports_longlong and kind == 'L') or
         (not cpu.supports_singlefloats and kind == 'S') or
-        kind == '*'):
+        kind == '*' or kind == '?'):
         raise UnsupportedKind("Unsupported kind '%s'" % kind)
     if kind == 'u':
         kind = 'i'
diff --git a/pypy/rlib/jit_libffi.py b/pypy/rlib/jit_libffi.py
--- a/pypy/rlib/jit_libffi.py
+++ b/pypy/rlib/jit_libffi.py
@@ -108,7 +108,8 @@
     def getkind(ffi_type):
         """Returns 'v' for void, 'f' for float, 'i' for signed integer,
         'u' for unsigned integer, 'S' for singlefloat, 'L' for long long
-        integer (signed or unsigned), or '*' for struct.
+        integer (signed or unsigned), '*' for struct, or '?' for others
+        (e.g. long double).
         """
         if   ffi_type == types.void:    return 'v'
         elif ffi_type == types.double:  return 'f'
@@ -136,7 +137,7 @@
         elif ffi_type == types.uint64:  return 'L'
         #
         elif types.is_struct(ffi_type): return '*'
-        raise KeyError
+        return '?'
 
     @staticmethod
     @jit.elidable


More information about the pypy-commit mailing list