Package: cffi
Macro define-foreign-type
Lambda Listdefine-foreign-type (name supers slots &rest options) SyntaxArgumentsDetails The macro define-foreign-type defines a new class class-name. It is a thin wrapper around defclass. Among other things, it ensures that class-name becomes a subclass of foreign-type, what you need to know about that is that there's an initarg :actual-type which serves the same purpose as defctype's base-type argument. Examples(define-foreign-type :boolean (&optional (base-type :int)) "Boolean type. Maps to an :int by default. Only accepts integer types." (ecase base-type ((:char :unsigned-char :int :unsigned-int :long :unsigned-long) base-type))) | See also |