[cffi-devel] C99 complex datatypes?

Juan Jose Garcia-Ripoll jjgarcia at users.sourceforge.net
Sun Oct 15 12:00:25 UTC 2006


2006/10/15, Mark Hoemmen <mark.hoemmen at gmail.com>:
> As such, we would like to include complex number support in lisp-matrix.
> However, CFFI doesn't support passing C structs by value, so we can't
> implement a complex number interface in CFFI using DEFCSTRUCT.

A number of lisps, including ECL and SBCL, do not support passing
structures by value. See for instance the SBCL manual page:
http://www.sbcl.org/manual/The-alien_002dfuncall-Primitive.html#The-alien_002dfuncall-Primitive

The reason, I believe, is that structure arguments complicate a lot
the calling of a function, in terms of registers used for in and out
values, and even the conventions differ between compilers on the same
platform.

Juanjo



More information about the cffi-devel mailing list