<div dir="ltr"><div><div><div><div><div><div><div><div>I am figurirng out my way through cffi, and I cannot figure out the following (this is in clisp):<br><br></div>Suppose I have a C functions that returns a result via a pointer.  Its definition is:<br>
<br></div>foo a, b, &c<br><br></div>and then I want to do 3 * c.<br><br></div><div>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?<br></div><div>
<br></div>Here is a scetch (where I already did defcfun ("foo" foo) ...)):<br>(let ((*c (foreign-alloc :float))<br></div></div>   (foo a b *c)<br></div>   (* 3 (??? *c))<br><br></div>Thank you,<br><br>Mirko<br></div>