Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
antik
gsll
Commits
22e43aff
Commit
22e43aff
authored
Jul 13, 2010
by
Liam Healy
Browse files
No finalizers in faify-form (array callbacks); add dependencies
parent
ebd23bf3
Changes
2
Hide whitespace changes
Inline
Side-by-side
gsll.asd
View file @
22e43aff
;; Definition of GSLL system
;; Liam Healy
;; Time-stamp: <2010-07-
07 09:55
:5
8
EDT gsll.asd>
;; Time-stamp: <2010-07-
13 21:07
:5
7
EDT gsll.asd>
;;
;; Copyright 2006, 2007, 2008, 2009 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
...
...
@@ -36,8 +36,8 @@
:components
((
:file
"init"
)
(
cffi-grovel:grovel-file
"libgsl"
:pathname
#+
unix
"libgsl-unix"
)
(
:file
"utility"
)
(
:file
"forms"
)
(
:file
"utility"
:depends-on
(
"init"
)
)
(
:file
"forms"
:depends-on
(
"init"
)
)
(
:file
"conditions"
:depends-on
(
"init"
"libgsl"
))
(
:file
"callback-compile-defs"
:depends-on
(
"init"
))
(
:file
"mobject"
:depends-on
(
"init"
"callback-compile-defs"
))
...
...
@@ -49,15 +49,15 @@
(
:file
"types"
:depends-on
(
"init"
"libgsl"
))
(
cffi-grovel:grovel-file
"callback-struct"
:depends-on
(
"types"
"libgsl"
))
(
:file
"funcallable"
:depends-on
(
"utility"
))
(
:file
"funcallable"
:depends-on
(
"init"
"utility"
))
(
:file
"interface"
:depends-on
(
"init"
"conditions"
))
(
:file
"defmfun"
:depends-on
(
"init"
"forms"
"interface"
))
(
:file
"defmfun-array"
:depends-on
(
"defmfun"
"callback-included"
))
:depends-on
(
"init"
"defmfun"
"callback-included"
))
(
:file
"defmfun-single"
:depends-on
(
"defmfun"
"mobject"
"callback"
))
(
:file
"body-expand"
:depends-on
(
"defmfun"
"mobject"
"callback"
))
:depends-on
(
"init"
"defmfun"
"mobject"
"callback"
))
(
:file
"body-expand"
:depends-on
(
"init"
"defmfun"
"mobject"
"callback"
))
(
:file
"generate-examples"
:depends-on
(
"init"
))))
(
:module
floating-point
:depends-on
(
init
)
...
...
init/funcallable.lisp
View file @
22e43aff
;; Generate a lambda that calls the user function; will be called by callback.
;; Liam Healy
;; Time-stamp: <2010-07-13
12:06:01
EDT funcallable.lisp>
;; Time-stamp: <2010-07-13
21:05:37
EDT funcallable.lisp>
;;
;; Copyright 2009, 2010 Liam M. Healy
;; Distributed under the terms of the GNU General Public License
...
...
@@ -63,19 +63,20 @@
(
defun
faify-form
(
ptr
argspec
)
"Make the form that turns the mpointer into a foreign-array."
;; No finalizer, because pointer might be reused by GSL.
(
ecase
(
parse-callback-argspec
argspec
'array-type
)
(
:foreign-array
; a GSL mpointer
`
(
make-foreign-array-from-mpointer
,
ptr
',
(
grid:cffi-cl
(
parse-callback-argspec
argspec
'element-type
))
,
(
length
(
parse-callback-argspec
argspec
'dimensions
))
t
))
nil
))
; no finalizer
(
:cvector
; a raw C vector
`
(
grid:make-foreign-array-from-pointer
,
ptr
',
(
parse-callback-argspec
argspec
'dimensions
)
',
(
grid:cffi-cl
(
parse-callback-argspec
argspec
'element-type
))
t
))))
nil
))))
;;;;****************************************************************************
;;;; Reference foreign elements and make multiple-value-bind form
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment