Next: , Previous: , Up: Alien Function Calls   [Contents][Index]

8.7.3 def-alien-routine Example

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).