Next: Calling Lisp from C, Previous: The def-alien-routine Macro, Up: Alien Function Calls [Contents][Index]
Consider the C function cfoo
with the following calling convention:
/* a for update * i out */ void cfoo (char *str, char *a, int *i);
which can be described by the following call to def-alien-routine
:
(def-alien-routine "cfoo" void (str c-string) (a char :in-out) (i int :out))
The Lisp function cfoo
will have two arguments (str and a)
and two return values (a and i).