original commit: c84fc87dd02fa1cd9a2ef0c1661e96f2c1a292ce
This commit is contained in:
Eli Barzilay 2004-10-10 08:10:04 +00:00
parent 7af4293212
commit ae529383a0

View File

@ -123,10 +123,10 @@
(ffi-get (ffi-obj (get-ffi-obj-name 'get-ffi-obj name) (get-ffi-lib lib))
type))
(define-syntax (get-ffi-obj stx)
(syntax-case stx (get-ffi-obj)
[(get-ffi-obj name lib type)
(syntax-case stx ()
[(_ name lib type)
#`(get-ffi-obj* name lib #,(syntax-property #`type 'ffi-name #'name))]
[get-ffi-obj #'get-ffi-obj*]))
[x (identifier? #'x) #'get-ffi-obj*]))
;; It is important to use the set-ffi-obj! wrapper because it takes care of
;; keeping a handle on the object -- otherwise, setting a callback hook will