Next: , Previous: defcunion, Up: Foreign Types


defctype

Syntax

— Macro: defctype name base-type &optional documentation

Arguments and Values

name
The name of the new foreign type.
base-type
A symbol or a list defining the new type.
documentation
A documentation string, currently ignored.

Description

The defctype macro provides a mechanism similar to C's typedef to define new types. The new type inherits base-type's translators, if any.

There is no way to define translations for types for types defined with defctype. For that, you should use define-foreign-type.

Examples

  (defctype my-string :string
    "My own string type.")
   
  (defctype long-bools (:boolean :long)
    "Booleans that map to C longs.")

See Also

define-foreign-type