c-string is a string containing C source code.
control
defaults to
:fasl
. If the value is
:fasl
, the C code is compiled at Lisp
compile-file
time into a temporary
.o
file. The resulting object module is stored in the fasl file. If the value is
:object
, the C code is compiled at
compile-file
time into a .o file with the same name as the Lisp source file, and loaded when the fasl file is loaded. If the value is
:source
, compilation and loading of the C code is done when the fasl file is loaded.
(process-foreign-code "int sum (int a, int b)
{ return a+b; }")
; When the lisp file containing this statement is
; loaded, the c-code is compiled and also loaded into
; the image.
link-load:read-foreign-modules
in the
LispWorks Reference Manual
and the Foreign Parser chapter in the LispWorks
Foreign Language Interface User Guide and Reference Manual