Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
cmucl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Carl Shapiro
cmucl
Commits
1cefe89a
Commit
1cefe89a
authored
19 years ago
by
rtoy
Browse files
Options
Downloads
Patches
Plain Diff
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
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/cmu-user/aliens.tex
+2
-3
2 additions, 3 deletions
docs/cmu-user/aliens.tex
with
2 additions
and
3 deletions
docs/cmu-user/aliens.tex
+
2
−
3
View file @
1cefe89a
...
@@ -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
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment