<div dir="ltr">Hi Esteban,<br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jul 8, 2015 at 8:37 AM, Esteban Lorenzano <span dir="ltr">&lt;<a href="mailto:estebanlm@gmail.com" target="_blank">estebanlm@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br><div style="word-wrap:break-word"><div>Hi,</div><div><br></div><div>When doing my tests for Pharo on spur, I’m having some FFI problems: </div><div><br></div><div><div>23 run, 19 passes, 0 skipped, 0 expected failures, 3 failures, 1 errors, 0 unexpected passes</div><div>Failures:</div><div>FFIPluginTests&gt;&gt;#testGenericCharCall</div><div>FFIPluginTests&gt;&gt;#testLibraryCharCall</div><div>FFIPluginTests&gt;&gt;#testConstructedCharCall</div><div><br></div><div>Errors:</div><div>FFIPluginTests&gt;&gt;#testLongLongs</div></div><div><br></div><div>Basically, first 3 failures is because FFI is answering an integer instead a char, and the last one is a coercion error. </div></div></blockquote><div><br></div><div>Hmmm, strange.  The code is at the bottom of ThreadedFFIPlugin&gt;&gt;ffiCreateIntegralResultOop:ofAtomicType:in:</div><div><br></div><div><div><span class="Apple-tab-span" style="white-space:pre">        </span>&quot;longlong, char&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>^(atomicType &gt;&gt; 1) = (FFITypeSignedLongLong &gt;&gt; 1) </div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ifTrue:</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>[(atomicType anyMask: 1)</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifTrue:[interpreterProxy signed64BitIntegerFor: retVal] &quot;signed return&quot;</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>ifFalse:[interpreterProxy positive64BitIntegerFor: retVal]]</div><div><span class="Apple-tab-span" style="white-space:pre">                </span>ifFalse:</div><div><span class="Apple-tab-span" style="white-space:pre">                        </span>[interpreterProxy characterObjectOf:</div><div><span class="Apple-tab-span" style="white-space:pre">                                </span>(retVal bitAnd: (self cppIf: #SPURVM</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                        </span>ifTrue: [16rFFFFFFFF]</div><div><span class="Apple-tab-span" style="white-space:pre">                                                                        </span>ifFalse: [255]))]</div></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><br></div><div>I suppose the “char” ones is because FFI is not taking into account that Character is now immediate (I might be wrong, I didn’t check). </div><div>I do not understand why the second one can fail… </div><div><br></div><div>Anyway… can anyone confirm if you have same errors?</div><div>(I’m using latest FFI package versions from <a href="http://source.squeakfoundation.org/FFI" target="_blank">http://source.squeakfoundation.org/FFI</a>)</div><div><br></div><div>thanks,</div><div>Esteban</div></div><br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">best,<div>Eliot</div></div>
</div></div>