<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>Hi,</div>so in dabusiness.h I changed&nbsp;<div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre"><br></span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>} <span style="color: #c800a7">else</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(123, 28, 175); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                </span></span><span style="color: #c800a7">long</span><span style="color: #000000"> v = </span><span style="color: #448388">interpreterProxy</span><span style="color: #000000">-&gt;</span>signed32BitValueOf<span style="color: #000000">(arg);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(68, 131, 136); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                </span></span><span style="color: #c800a7">if</span><span style="color: #000000"> (</span>interpreterProxy<span style="color: #000000">-&gt;</span><span style="color: #7b1caf">failed</span><span style="color: #000000">())</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(125, 70, 37); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                        </span></span><span style="color: #c800a7">return</span><span style="color: #000000"> </span>PrimErrBadArgument<span style="color: #000000">;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>*(<span style="color: #c800a7">long</span> *)argvec = v;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>argvec += <span style="color: #c800a7">sizeof</span>(<span style="color: #c800a7">long</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div></div><div><br></div><div>for</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>} <span style="color: #c800a7">else</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span><span style="color: #c800a7">long</span> v;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span><span style="color: #448388">sqInt</span> argClass = <span style="color: #448388">interpreterProxy</span>-&gt;<span style="color: #7b1caf">fetchClassOf</span>(arg);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span><span style="color: #c800a7">if</span> (argClass == (<span style="color: #448388">interpreterProxy</span>-&gt;<span style="color: #7b1caf">classLargePositiveInteger</span>())) {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(123, 28, 175); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                        </span>v = </span><span style="color: #448388">interpreterProxy</span><span style="color: #000000">-&gt;</span>positive32BitValueOf<span style="color: #000000">(arg);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>} <span style="color: #c800a7">else</span> {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(123, 28, 175); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                        </span>v = </span><span style="color: #448388">interpreterProxy</span><span style="color: #000000">-&gt;</span>signed32BitValueOf<span style="color: #000000">(arg);</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>}</div><p style="margin: 0.0px 0.0px 0.0px 0.0px; font: 11.0px Menlo; min-height: 13.0px"><span class="Apple-tab-span" style="white-space:pre">                                </span><br class="webkit-block-placeholder"></p><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(68, 131, 136); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                </span></span><span style="color: #c800a7">if</span><span style="color: #000000"> (</span>interpreterProxy<span style="color: #000000">-&gt;</span><span style="color: #7b1caf">failed</span><span style="color: #000000">())</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; color: rgb(125, 70, 37); "><span style="color: #000000"><span class="Apple-tab-span" style="white-space:pre">                                        </span></span><span style="color: #c800a7">return</span><span style="color: #000000"> </span>PrimErrBadArgument<span style="color: #000000">;</span></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>*(<span style="color: #c800a7">long</span> *)argvec = v;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                                </span>argvec += <span style="color: #c800a7">sizeof</span>(<span style="color: #c800a7">long</span>);</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 11px/normal Menlo; "><span class="Apple-tab-span" style="white-space:pre">                        </span>}</div></div><div><br></div><div>now it seems to be working... maybe I need extend this for other integer possible values? well, one problem at a time... for now is working, but the Alien Bridge still don't, so I'll continue hacking that :)</div><div><br></div><div>Cheers and thanks</div><div>Esteban</div><div><br></div><div><br><div><div>El 28/12/2010, a las 5:37a.m., Igor Stasenko escribió:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>On 28 December 2010 01:54, Esteban Lorenzano &lt;<a href="mailto:estebanlm@gmail.com">estebanlm@gmail.com</a>&gt; wrote:<br><blockquote type="cite"><br></blockquote><blockquote type="cite">Hi,<br></blockquote><blockquote type="cite">I'm trying to get the Alien ObjectiveC bridge to work, and I'm having a problem (right now no cog, just cocoa vm 5.7 with "regular" alien, NewspeakI32ABIPlugin), and I'm having a problem on sending a message with this form:<br></blockquote><blockquote type="cite">someAlien<br></blockquote><blockquote type="cite">primFFICallResult: resultAlien<br></blockquote><blockquote type="cite">withArguments: {anAlien. aLargePositiveInteger}<br></blockquote><blockquote type="cite">so... it is answering primitiveFail (code 3), because the third argument is bad taken when converting... the primitive does this path:<br></blockquote><blockquote type="cite">callIA32IntegralReturn,<br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite">long v = interpreterProxy-&gt;signed32BitValueOf(arg);<br></blockquote><blockquote type="cite">...<br></blockquote><blockquote type="cite">value = (((byteAt((oop + (BASE_HEADER_SIZE)) + 0)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 1)) &lt;&lt; 8)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 2)) &lt;&lt; 16)) + ((byteAt((oop + (BASE_HEADER_SIZE)) + 3)) &lt;&lt; 24);<br></blockquote><blockquote type="cite">value here is negative, and of course, it throws an error.<br></blockquote><blockquote type="cite">So... anybody has a clue of whats wrong? I know the number is actually a LargePositiveInteger, so it should be ok, and pass... so any idea?<br></blockquote><br>sure, if your largePositiveInteger, which is 32bit unsigned integer,<br>then<br><br> long v = interpreterProxy-&gt;signed32BitValueOf(arg);<br><br>should be<br><br>unsigned long v = interpreterProxy-&gt;positive32BitValueOf(arg);<br><br><blockquote type="cite">Cheers,<br></blockquote><blockquote type="cite">Esteban<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><br><br><br>-- <br>Best regards,<br>Igor Stasenko AKA sig.<br></div></blockquote></div><br></div></body></html>