4.1 The Foreign Function Interface

4.1.6 Predefined data types for foreign structures

Predefined types are types that are predefined in this implementation of Liquid Common Lisp. Primitive types are predefined types that have a corresponding Lisp type; that is, the functionforeign-value can return an equivalent Lisp object for a pointer to an object with a primitive foreign type.

Table 4.2 pairs the primitive data types that are valid for foreign structures with their Lisp equivalent types.

Primitive data types for foreign structures
Primitive Foreign TypeLisp Type
:charactercharacter
:signed-8bitfixnum
:unsigned-8bitfixnum
:signed-16bitfixnum
:unsigned-16bitfixnum
:signed-32bitinteger
:unsigned-32bitinteger
:single-floatfloat
:double-floatfloat
(:pointer foreign-type)no equivalent type
(:field size position) integer
(:signed-field size position)integer
(:bit-field size position) integer
(:signed-bit-field size position)integer
(:array foreign-type array-dimensions-list array-discipline)no equivalent type


The Advanced User's Guide - 9 SEP 1996

Generated with Harlequin WebMaker