Skip to content
Snippets Groups Projects
Commit 1cefe89a authored by rtoy's avatar rtoy
Browse files

o Definition of DEF-CALLBACK didn't include &body. (Noted by Luis

  Oliveira, cmucl-help.)

o Use CALLBACK-FUNCALL in the example.
parent 624c3dc2
No related branches found
No related tags found
No related merge requests found
...@@ -751,7 +751,7 @@ and two return values (\var{a} and \var{i}). ...@@ -751,7 +751,7 @@ and two return values (\var{a} and \var{i}).
macro: macro:
\begin{defmac}{alien:}{def-callback}{\var{name} (\var{return-type} \begin{defmac}{alien:}{def-callback}{\var{name} (\var{return-type}
\mstar{(arg-name arg-type)})} \mstar{(arg-name arg-type)}) \ampbody\ body}
This macro defines a Lisp function that can be called from C and a This macro defines a Lisp function that can be called from C and a
Lisp variable. The arguments to the function must be alien types, Lisp variable. The arguments to the function must be alien types,
and the return type must also be an alien type. This Lisp function and the return type must also be an alien type. This Lisp function
...@@ -792,8 +792,7 @@ Here is a simple example of using callbacks. ...@@ -792,8 +792,7 @@ Here is a simple example of using callbacks.
(+ arg1 arg2)) (+ arg1 arg2))
(defun test-foo () (defun test-foo ()
(alien-funcall (sap-alien (callback foo) (function int int int)) (callback-funcall foo 555 444444))
555 444444))
\end{lisp} \end{lisp}
In this example, the callback function \code{foo} is defined which In this example, the callback function \code{foo} is defined which
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment