<div><div>I'm trying to call C functions that return arguments via int*. But I'm not sure how to make an integer that I can use as a pointer in C, and still read it back in ECL.</div><div><br></div><div>This code below doesn't work. It segfaults. Any help?</div>
<div>;;;;;</div><div><br></div><div>(clines "void test(int* a) {</div><div> *a = 5;</div><div>};")</div><div><br></div><div>(defun set-to-five ()</div><div> (with-foreign-object (item :int)</div><div> (c-inline (item) ((* :int)) :void "test(#0)" :one-liner t)</div>
<div> (format t "~%I GOT: ~a" (deref-pointer item :int))))</div></div><div>;;;;</div><div><br></div><br clear="all"><div>Cheers,<br></div><div>Warren Wilkinson</div><div><a href="tel:1%20403%20383-7152" value="+14033837152" target="_blank">1 403 383-7152</a></div>