Skip to content
Commit f5469081 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Define structure interface to libffi

Generic function translate-into-foreign-memory and funtion
convert-into-foreign-memory definitions now loaded by cffi.  System
cffi-fsbv defined for calling functions with foreign structures by
value using libffi.  Current state of this system is to make
libffi-type-pointer and associate with the structure in defcstruct.
This works on test structure
(macroexpand '(defcstruct (complex :class complex-type) (real :double) (imag :double)))
but nothing further is done with the libffi-type-pointer.

To do: fix lookup-type so that if there is no type defined, it returns
nil.  Do iterate-foreign-structure in advance of macro expansion in
cstruct-libffi-hook, if any arguments lack type translation, then
return nil.  This means that that structure can not be passed/returned
by value.  Then load cif after cstruct.  Secondary bug fix: defsynonym
'unsigned to something, not sure what it's supposed to be; :uint?
parent 70247371
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment