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
02301098
Commit
02301098
authored
34 years ago
by
wlott
Browse files
Options
Downloads
Patches
Plain Diff
Fixed compute-call-form to quote all the types it passes to make-alien,
and to correctly deal with returning pointer-types.
parent
e9209f96
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
code/c-call.lisp
+11
-3
11 additions, 3 deletions
code/c-call.lisp
with
11 additions
and
3 deletions
code/c-call.lisp
+
11
−
3
View file @
02301098
...
@@ -504,7 +504,7 @@
...
@@ -504,7 +504,7 @@
single-float
double-float
)
single-float
double-float
)
(
sub-compute-call-form
descr
))
(
sub-compute-call-form
descr
))
(
null-terminated-string
(
null-terminated-string
`
(
alien-access
(
make-alien
,
descr
`
(
alien-access
(
make-alien
'
,descr
,
(
c-type-size
return-type
)
,
(
c-type-size
return-type
)
,
(
sub-compute-call-form
,
(
sub-compute-call-form
'system-area-pointer
))
'system-area-pointer
))
...
@@ -523,11 +523,19 @@
...
@@ -523,11 +523,19 @@
(
error
"Can't return ~S yet."
descr
)))))
(
error
"Can't return ~S yet."
descr
)))))
(
record-type
(
record-type
(
error
"Can't return ~S yet."
(
c-type-description
return-type
)))
(
error
"Can't return ~S yet."
(
c-type-description
return-type
)))
((
or
array-type
pointer-type
)
(
pointer-type
(
let
((
type
(
pointer-type-to
return-type
)))
(
unless
(
c-type-size
type
)
(
error
"Can't return pointers to objects of unknown size: ~S"
(
c-type-description
return-type
)))
`
(
make-alien
',
(
c-type-description
type
)
,
(
c-type-size
type
)
,
(
sub-compute-call-form
'system-area-pointer
))))
(
array-type
(
unless
(
c-type-size
return-type
)
(
unless
(
c-type-size
return-type
)
(
error
"Can't return arrays of unknown size: ~S"
(
error
"Can't return arrays of unknown size: ~S"
(
c-type-description
return-type
)))
(
c-type-description
return-type
)))
`
(
make-alien
,
(
c-type-description
return-type
)
`
(
make-alien
'
,
(
c-type-description
return-type
)
,
(
c-type-size
return-type
)
,
(
c-type-size
return-type
)
,
(
sub-compute-call-form
'system-area-pointer
))))))
,
(
sub-compute-call-form
'system-area-pointer
))))))
...
...
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