4 Type Conversions ¶
Currently, all type conversions work the same in both directions.
- A function declared with a
:void
return type will always return nil
to
Lisp.
- A function returning any integer or character type will return a Lisp
integer. Note that this may result in the value being truncated; currently
there is nothing that can be done about this.
- A C pointer will be returned as a user-pointer (a new Lisp type introduced by
the dynamic module patch).
- A structure is also represented as a user-pointer. When a structure is
returned by value from a foreign function, the resulting user-pointer will
have a finalizer attached that will free the memory when the user-pointer is
garbage collected.