<br><br><div class="gmail_quote">On Sun, Dec 12, 2010 at 1:45 AM, Luís Oliveira <span dir="ltr"><<a href="mailto:luismbo@gmail.com">luismbo@gmail.com</a>></span> wrote:<br><div class="im"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
The equivalent CFFI code would be something like:<br>
<br>
(with-foreign-object (p :pointer)<br>
(getifaddrs p)<br>
(foreign-slot-value (mem-ref p :pointer) 'ifaddrs 'name))<br>
<br>
If you define NAME's type to be :STRING, that code will yield a Lisp string.<br></blockquote></div><div><br>That works, thanks<br><br>The man page shows that the allocated struct should be free calling freeifaddrs:<br>
<br>
void freeifaddrs(struct ifaddrs *ifa);<br><br>(freeifaddrs (cffi:mem-ref p :pointer))<br><br>is that the correct way to call freeifaddrs?<br><br>Regards,<br>Jose<br></div>
<font color="#888888"><br></font></div>