Previous: , Up: Basic C Types and Functions   [Contents][Index]


65.1.8 FFI type-related functions

Function: ffi-basic-type-p type

Return non-nil if type is a basic FFI type.

A type is said to be basic, if it is neither a pointer nor a function, and there is a corresponding built-in type in C.

Function: ffi-type-p type &optional signal-p

Return non-nil if type is a valid FFI type. If optional argument signal-p is non-nil and type is not an FFI type, additionally signal an error.

Variable: ffi-type-checker [defaults to: ffi-type-p]

Function to call when the validity of an FFI type shall be checked.

Variable: ffi-named-types

Alist of named FFI types with elements of the form (NAME . FFI-TYPE).

Function: ffi-size-of-type type

Return the size of the foreign type type.

Valid foreign types are: ‘byte’, ‘unsigned-byte’, ‘char’, ‘unsigned-char’, ‘short’, ‘unsigned-short’, ‘int’, ‘unsigned-int’, ‘long’, ‘unsigned-long’, ‘pointer-void’, ‘float’, ‘double’, ‘object’, and ‘c-string’.

Function: ffi-fixup-type type

Return FFI type type in a canonical form.

Function: ffi-set-storage-size fo size

Set the size of the allocated space of fo to size.