Made some progress, backing up in git
This commit is contained in:
parent
6bc1db5cde
commit
14bbd63d5f
|
|
@ -11,6 +11,7 @@
|
|||
(ffi vector))
|
||||
(export pffi-shared-object-load
|
||||
pffi-define
|
||||
pffi-define-callback
|
||||
pffi-size-of
|
||||
pffi-pointer-allocate
|
||||
pffi-pointer-null
|
||||
|
|
@ -62,6 +63,14 @@
|
|||
(_cprocedure (mlist->list (map pffi-type->native-type argument-types))
|
||||
(pffi-type->native-type return-type)))))))
|
||||
|
||||
(define-syntax pffi-define-callback
|
||||
(syntax-rules ()
|
||||
((pffi-define-callback scheme-name return-type argument-types procedure)
|
||||
(define scheme-name
|
||||
(ffi-callback procedure
|
||||
(mlist->list (map pffi-type->native-type argument-types))
|
||||
(pffi-type->native-type return-type))))))
|
||||
|
||||
(define pffi-size-of
|
||||
(lambda (type)
|
||||
(ctype-sizeof (pffi-type->native-type type))))
|
||||
|
|
|
|||
Loading…
Reference in New Issue