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

Functioning structure calls by value with foreign-funcall

1. Definition of test structure in GSL with (dat :double :count 2),
not two separate doubles. 
2. When computing libffi-type-pointer, iterate through slots in
order. 
3. When computing libffi-type-pointer, count the multiplicity of the
slot and set each; for aggregate slots, this can be greater than one. 
4. The returned value from the callable-function is the result set by
the call to #'call. 
5. This works correctly for the example definitions in
fsbv/examples.lisp using GSL. 
CFFI(12): (foreign-funcall "gsl_complex_conjugate"
            (:struct complex-double) #C(3.0d0 4.0d0) 
            (:struct complex-double))
#C(3.0d0 -4.0d0)
CFFI(13): (foreign-funcall "gsl_complex_abs" 
            (:struct complex-double) #C(3.0d0 4.0d0) :double)
5.0d0
parent 5c07026d
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