Hi,
Michael Goffioul, one of the developers of ECL, has passed some patches which port cffi-luis to the CVS version of ECL.
The changes include support for callbacks and also for dynamic loading of libraries, calling of foreign functions which are defined in these libraries and also runtime definition of C variables.
Please feel free to incorporate this into your source tree. All tests are passed except for one that has a memory leak.
Juanjo
On 27/out/2005, at 15:18, Juan Jose Garcia Ripoll wrote:
Michael Goffioul, one of the developers of ECL, has passed some patches which port cffi-luis to the CVS version of ECL.
Great! I'll add a note in the webpage saying that ECL CVS is required and update the port's status to "Working."
Also, some of the new features require recent features ECL, IIRC. Which platforms are supported by ECL/CFFI? (or which features don't work on which platforms, if any?)
For example, it'd be nice to push :no-cffi-callbacks to *features* on platforms where ECL doesn't support callbacks.
Please feel free to incorporate this into your source tree. All tests are passed except for one that has a memory leak.
Done that, and that test should be fixed now.
Thu Oct 27 15:39:48 WEST 2005 Luis Oliveira loliveira@common-lisp.net * Updated ECL support
- Updated cffi-ecl.lisp, courtesy of Michael Goffioul. (Includes some ECL specific workarounds in the portable bits of CFFI.)
Thu Oct 27 15:28:55 WEST 2005 Luis Oliveira loliveira@common-lisp.net * Fix memory leak in test FOREIGN-GLOBALS.REF.STRING
Thanks!
On Thu, 2005-10-27 at 15:56 +0100, Luis Oliveira wrote:
Great! I'll add a note in the webpage saying that ECL CVS is required and update the port's status to "Working."
Thanks
Also, some of the new features require recent features ECL, IIRC. Which platforms are supported by ECL/CFFI? (or which features don't work on which platforms, if any?) For example, it'd be nice to push :no-cffi-callbacks to *features* on platforms where ECL doesn't support callbacks.
All features are supported. ECL however sponsors two types of implementations: one which uses the C compiler, and on some platforms, one which uses some assembly code.
The C implementation always works. This means that a file that uses CFFI and is COMPILE-FILE'd will have access to callbacks, C functions, variables, etc, on all platforms.
The assembler implementation is currently only working on the x86 platform. The only significant advantage of this implementation is that it also works with interpreted code. User can load shared libraries, define callbacks and call C functions from the command line.
The ECL feature DFFI (stands for dynamical ffi) is defined on platforms on which the second implementation is available.
Regards,
Juanjo