Commits

Armin Rigo  committed dbcaebc

Add kind == '?'.

  • Participants
  • Parent commits 9366237

Comments (0)

Files changed (2)

File pypy/jit/backend/llsupport/ffisupport.py

     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'

File pypy/rlib/jit_libffi.py

     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'
         elif ffi_type == types.uint64:  return 'L'
         #
         elif types.is_struct(ffi_type): return '*'
-        raise KeyError
+        return '?'
 
     @staticmethod
     @jit.elidable