Using foreign values in CL expressions
Mirko Vukovic
mirko.vukovic at gmail.com
Thu Jun 27 11:10:31 UTC 2013
I am figurirng out my way through cffi, and I cannot figure out the
following (this is in clisp):
Suppose I have a C functions that returns a result via a pointer. Its
definition is:
foo a, b, &c
and then I want to do 3 * c.
What do I have to give for c? I do have its address. Should I use
mem-ref, or convert-from-foreign, or something else?
Here is a scetch (where I already did defcfun ("foo" foo) ...)):
(let ((*c (foreign-alloc :float))
(foo a b *c)
(* 3 (??? *c))
Thank you,
Mirko
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20130627/71326212/attachment.html>
More information about the cffi-devel
mailing list