[cffi-devel] defcstruct and array.

mosi amosat+python at gmail.com
Tue Dec 30 13:59:09 UTC 2008


Hi,
I`m experimenting with defcstruct.
I tried the following:

(*defcstruct* point
    (nr :int)
    (name :char :count 32)
    (coordinates :float :count 3))

which also works like:
...
 (coordinate1 :float)
 (coordinate2 :float)
 (coordinate3 :float)

I`m getting the values like this:
(*with-foreign-object* ....
(*with-foreign-slots* ...

nr by foreign-slot-value
name by foreign-string-to-lisp
but how do I read the array of floats with N dimensions into lisp?

Maybe I am missing something obvious here. Thanks a lot.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20081230/f3dc52e5/attachment.html>


More information about the cffi-devel mailing list