UFFI-izing some CLisp FFI
Kenny Tilton <[email protected]> Fri, 19 Nov 2004 09:39:26 -0500
| Newsgroups | gmane.lisp.uffi.devel |
|---|---|
| Message-ID | <[email protected]> |
I have some CLisp with native FFI I am trying to switch to UFFI. Ran
into some stuff which is over my head. Here is the CLisp:
(defun gtk-object-set-property (obj property val-type val)
(let ((varargs-def
`(c-struct list
(value ,val-type)
(end c-pointer))))
(with-c-var (vec varargs-def (list val nil))
(g-object-set-valist obj property
(c-var-address (slot vec 'value))))))
I see UFFI has with-foreign-object to replace with-c-var (right?), but
that does not take optional initialization. OK, I just do the
initialization procedurally in the body? I'll live.
And that type-on-the-fly `(c-struct list ...) -- no can do in UFFI, I
think. I need to break that out as a standalone:
(uffi:defstruct valist..)?
How'm I doing?
kt
--
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film
--
Cells? Cello? Celtik?: http://www.common-lisp.net/project/cells/
Why Lisp? http://alu.cliki.net/RtL%20Highlight%20Film