claw

API Reference

claw

Import c2ffi specs and generate CFFI wrappers

CLAW

  • Function BY-REMOVING-PREFIXES (&rest prefixes)
  • Function BY-CHANGING (from to)
  • Function IN-PIPELINE (&rest processors)
  • Function BY-REMOVING-COMPLEX-PREFIX (regex symbols-to-cut)
  • Macro WITH-FLOAT-TRAPS-MASKED ((&rest masks) &body body)
  • Variable *C2FFI-PROGRAM*
    "c2ffi"
  • Variable *TRACE-C2FFI*
    nil
  • Function PTR (wrapper)
  • Function VALID-P (wrapper)
  • Function INVALIDATE (wrapper)
  • Function WRAP-POINTER (pointer type &optional (validity t))
  • Function WRAPPER-NULL-P (wrapper)
  • Function ENUM-VALUE (foreign-enum key)
  • Function ENUM-KEY (foreign-enum val)
  • Macro DEFINE-ENUM-FROM-CONSTANTS ((name &optional regex) &body values)
    Define an enum *and alias* `NAME` from a list of constants `VALUES`. Each value should evaluate to actual values, e.g. actual `+CONSTANTS+`, or be a list in the form `'(SYMBOL VALUE)`. If a symbol is given alone, it is by default pruned of any common prefix and made into a keyword. If a list is specified, the symbol given is used exactly.
  • Function BITFIELD-MASK (bit-offset bit-size bit-alignment field-width)
  • Macro DEFCALLBACK (name return-type lambda-list &body body)
    This acts much like CFFI:DEFCALLBACK except it allows SFFI type aliases to be specified.
  • Macro CALLBACK (name)
  • Function FOREIGN-FUNCTION-POINTER (symbol)
  • Function ALLOC (type &optional (count 1))
    Return a foreign wrapper for `TYPE` with its pointer allocated. Freeing is up to you!
  • Function CALLOC (type &optional (count 1))
    Return a foreign wrapper for `TYPE` with its pointer allocated, and its contents initialized to zero. Freeing is up to you!
  • Function REALLOC (ptr type count)
  • Function FREE (object)
    Free WRAPPER via FOREIGN-FREE and invalidate.
  • Function ALIGNOF (type)
  • Function SIZEOF (type)
  • Function OFFSETOF (struct field)
  • Macro WITH-ALLOC ((name type &optional (count 1)) &body body)
  • Macro WITH-FREE ((name value) &body body)
  • Macro WITH-CALLOC ((name type &optional (count 1)) &body body)
  • Macro WITH-MANY-ALLOC ((&rest bindings) &body body)
  • Macro WITH-MANY-FREE ((&rest bindings) &body body)
  • Function MEMCPY (dest src &key (n 1) type)
  • Function GET-ERRNO-POINTER
  • Function DEFINE-BITMASK (name mask)
  • Function FIND-BITMASK (name)
  • Function REMOVE-BITMASK (name)
  • Function MASK-SYMBOL-VALUE (mask symbol)
  • Function MASK (name &rest symbols)
    Create a mask by `LOGIOR` using the *list* of symbols `SYMBOLS` from the bitmask `NAME`.
  • Function MASK-APPLY (name symbols)
  • Function MASK-KEYWORDS (name value)
    Return the list of keywords which describe the integer mask `VALUE` for the bitmask called `NAME`. Limited to 64 bits at the moment.
  • Macro DEFINE-BITMASK-FROM-CONSTANTS ((name &optional regex) &body values)
    Define a bitmask `NAME` from a list of constants `VALUES`. Each value should evaluate to actual values, e.g. actual `+CONSTANTS+`, or be a list in the form `'(SYMBOL VALUE)`. If a symbol is given alone, it is by default pruned of any common prefix and made into a keyword. If a list is specified, the symbol given is used exactly.
  • Macro DEFINE-BITMASK-FROM-ENUM ((name enum-name) &body values)
    Define a bitmask `NAME` from the values specified in the previously-defined foreign-enum named `ENUM-NAME` and any additional values, `VALUES`. (A foreign-alias of an enum may also be specified.)
  • Macro C-INCLUDE (header system-name &body body &key in-package include-sources include-definitions exclude-sources exclude-definitions rename-symbols sysincludes (windows-environment "gnu"))
  • Macro C-FUN (name &rest args)
  • Macro C-REF (&whole whole-form wrapper type &rest fields)
  • Macro C-LET (bindings &body body)
  • Macro C-WITH (bindings &body body)
  • Macro C-VAL (bindings &body body)