<br>ImageSegment &gt;&gt; endianness<br>    &quot;Return which endian kind the incoming segment came from&quot;<br>
<br>    ^ (segment first bitShift: -24) asCharacter == $d ifTrue: [#big] ifFalse: [#little]<br><br><br>Check senders of #endianness, mostly in methods like #startUpFrom:<br><br>Cheers<br><br>Mariano<br><br><div class="gmail_quote">
On Sat, Apr 16, 2011 at 11:43 PM, Matthew Fulmer <span dir="ltr">&lt;<a href="mailto:tapplek@gmail.com">tapplek@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>
On Sat, Apr 16, 2011 at 05:34:59PM -0400, Matthew Fulmer wrote:<br>
&gt;<br>
&gt; I discovered a bug in cobalt today due to the float-endianness<br>
&gt; of ImageSegments made in cog vs interpreter:<br>
&gt;<br>
&gt; <a href="http://croquet-src-01.oit.duke.edu/mantis/view.php?id=503" target="_blank">http://croquet-src-01.oit.duke.edu/mantis/view.php?id=503</a><br>
&gt;<br>
&gt; Is there a way to detect the platform endianness, so we can, in<br>
&gt; the future, add metadata about that to ImageSegments, and then<br>
&gt; byte-swap them if needed?<br>
&gt;<br>
&gt; Failing that, I guess we could add a constant float to the image<br>
&gt; segment, and test whether it unpacks as byte-swapped or not<br>
<br>
Thinking about it, I guess this should be fixed in the<br>
ImageSegment post-loader, rather than in cobalt<br>
<font color="#888888"><br>
--<br>
Matthew Fulmer (a.k.a. Tapple)<br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Mariano<br><a href="http://marianopeck.wordpress.com" target="_blank">http://marianopeck.wordpress.com</a><br><br>