1 <chapter id="ffi"><title>The Foreign Function Interface</>
3 <para>FIXME: The material in the &CMUCL; manual about the foreign
4 function interface should be reviewed, reformatted in DocBook,
5 lightly edited for &SBCL;, and substituted into this manual. But in
6 the meantime, the original &CMUCL; manual is still 95+% correct for
7 the &SBCL; version of the foreign function interface. (The main
8 difference is that the package names have changed. CMU CL's FFI
9 is in two packages named <quote><literal>ALIEN</></> and
10 <quote><literal>C-CALL</></>. The corresponding SBCL FFI is
11 in a single package named
12 <quote><literal>SB-ALIEN</></>.)
13 <!-- FIXME: Oh, and I seem to remember that the CMUCL manual
14 was out of date about how to test for a null pointer,
15 there's a builtin operator to do it, you don't need to
16 do the nasty idiom the manual says you need to do. -->
17 <!-- FIXME: Also, the CMU CL alien documentation claims you
18 can just do (DEFINE-ALIEN-VARIABLE "errno" INT), but it's
19 wrong. That fails with the multithreading hacks hacks
20 now built into the C library. -->
21 <!-- FIXME: Also, we support not only LOAD-FOREIGN but
22 also LOAD-1-FOREIGN. -->
25 <listitem><para>Type Translations</></>
26 <listitem><para>System Area Pointers</></>
27 <listitem><para>Alien Objects</></>
28 <listitem><para>Alien Types</></>
29 <listitem><para>Alien Operations</></>
30 <listitem><para>Alien Variables</></>
31 <listitem><para>Alien Function Calls</></>