27 Jun
2013
27 Jun
'13
11:10 a.m.
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