Next: , Previous: , Up: Top   [Contents][Index]


2 Built-In Foreign Types

Foreign Type: :char
Foreign Type: :unsigned-char
Foreign Type: :short
Foreign Type: :unsigned-short
Foreign Type: :int
Foreign Type: :unsigned-int
Foreign Type: :long
Foreign Type: :unsigned-long
Foreign Type: :long-long
Foreign Type: :unsigned-long-long

These types correspond to the native C integer types according to the ABI of the system the Lisp implementation is compiled against.

Foreign Type: :int8
Foreign Type: :uint8
Foreign Type: :int16
Foreign Type: :uint16
Foreign Type: :int32
Foreign Type: :uint32
Foreign Type: :int64
Foreign Type: :uint64

Foreign integer types of specific sizes, corresponding to the C types defined in stdint.h.

Foreign Type: :size
Foreign Type: :ssize
Foreign Type: :ptrdiff
Foreign Type: :time

Foreign integer types corresponding to the standard C types (without the _t suffix).

Implementor’s note: I’m sure there are more of these that could be useful, let’s add any types that can’t be defined portably to this list as necessary.

Foreign Type: :float
Foreign Type: :double

The :float type represents a C float and a Lisp single-float. :double represents a C double and a Lisp double-float.

Foreign Type: :pointer

A foreign pointer to an object of any type, corresponding to void *.

Foreign Type: :void

No type at all. Only valid as the return type of a function.