On Mon, Apr 26, 2010 at 12:57 AM, Luís Oliveira <span dir="ltr"><<a href="mailto:luismbo@gmail.com">luismbo@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Sun, Apr 25, 2010 at 1:47 PM, Juan Jose Garcia-Ripoll<br>
<<a href="mailto:juanjose.garciaripoll@googlemail.com">juanjose.garciaripoll@googlemail.com</a>> wrote:<br>
> * The former definition for :long-long types in cffi-ecl.lisp was broken. I<br>
> have agumented ECL with a feature that signals the existence of such a type<br>
> in ECL and include a patch here for CFFI to take that into account. (Patch<br>
> attached)<br>
<br>
</div>I've tweaked your patch to use that feature to decide when to push<br>
cffi-sys::no-long-long to *features*.<br></blockquote><div class="im"><br>Please don't. LONG-LONG is not supported by the interpreter backend (libffi) because it considers it a complex type. Until I figure out how to use it, we should still stick with that.<br>
<br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"><div class="im">> * Upon reading the CFFI specification it seems that FOREIGN-FREE can only<br>
> free memory that has been allocated by CFFI. However the test cases in<br>
> misc-types.lsp do something else, deallocating the output of my_strdup()<br>
> explicitely.<br>
<br>
</div>That was the probably the original intent. Is this problematic for<br>
ECL? (I'm guessing it's because of the GC?)<br></blockquote><div><br>It is very problematic because ECL allocates and frees foreign memory using the garbage collector. If the user applies FOREIGN-FREE upon a pointer that was NOT created using CFFI, then ECL's garbage collector will choke. The tests we causing ECL to hang.<br>
<br>Juanjo<br clear="all"></div></div><br>-- <br>Instituto de Física Fundamental, CSIC<br>c/ Serrano, 113b, Madrid 28006 (Spain) <br><a href="http://tream.dreamhosters.com">http://tream.dreamhosters.com</a><br>