diff --git a/doc/ffi.xmlf b/doc/ffi.xmlf index 0aa092506..5dc499479 100644 --- a/doc/ffi.xmlf +++ b/doc/ffi.xmlf @@ -80,8 +80,13 @@ a little piece of assembly code does the job of translating the lisp data into foreign objects, storing the arguments in the stack and in CPU registers, calling the function and converting back the output of the - function to lisp. + function to lisp. + + &ECL; for this purpose utilizes the library "A Portable Foreign + Function Interface Library" commonly known as libffi. + @@ -103,46 +108,19 @@ On the other hand, the dynamic approach allows us to choose the libraries we load at any time, look for the functions and invoke them even - from the toplevel, but it relies on unportable techniques and requires from - us, the developers of &ECL;, to know very well both the assembly code of the - machine &ECL; runs on and the calling conventions of that particular - operating system. + from the toplevel, but it relies on unportable techniques and requires the + developers to know very well both the assembly code of the machine the code + runs on and the calling conventions of that particular operating system. For + these reasons &ECL; doesn't maintain it's own implementation of the DFFI but + rather relies on the third party library. &ECL; currently supports the static method on all platforms, and the - dynamical one a few of the most popular ones, shown in . You can test if your copy of &ECL; was built with - DFFI by inspecting whether the symbol :DFFI is present in - the list from variable *FEATURES*. + dynamical one a wide range of the most popular ones, shown in libffi. You can test if your + copy of &ECL; was built with DFFI by inspecting whether the symbol + :DFFI is present in the list from variable + *FEATURES*. - - DFFI support - - - - Architecture - Support - Operating systems - - - - - Intel x86 32 bits - Complete - Any with SysV ABI (Linux, BSD), Windows, OS X - - - Intel x86 64 bits - In progress - SysV ABI - - - PowerPC 32 bits - In progress - OS X - - - -
@@ -170,7 +148,7 @@ The most important component of the object is the memory region where data is stored. By default &ECL; assumes that the user will perform automatic - managment of this memory, deleting the object when it is no longer + management of this memory, deleting the object when it is no longer needed. The first reason is that this block may have been allocated by a foreign routine using malloc(), or mmap(), or statically, by referring to a C constant. The @@ -219,7 +197,7 @@ &ECL;'s own low level interface. Only to be used if &ECL; is your deployment platform. It features some powerful constructs that allow you to - merge arbitrary C code with lisp ( and and ).