<html><head><base href="x-msg://140/"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">That shouldn't affect things since the pickler picks apart the structures and ships the individual primitives. Right?<div>
<br><div><div>On 1 Feb 2010, at 02:41, Jay K wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><span class="Apple-style-span" style="border-collapse: separate; font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div class="hmmessage" style="font-size: 10pt; font-family: Verdana; ">Let's say I have:<br> <br> <br>TYPE FOO = RECORD a: LONGFLOAT; b: UINT32; END;<br>TYPE FOOA = ARRAY [0..1] OF FOO;<br> <br> <br>And I have a platform with max_align = 32 and a platform with max_align = 64.<br>One platform will make FOOA be 24 bytes, the other 32.<br> One platform will pad out FOO to be align the 8 byte LONGFLOAT, one won't.<br>Can that pickle be read/written by the two platforms?<br>And how does the code know/detect the difference?<br>That is, if a platform changed from max_align = 32 to 64, would the pickle code work just<br>as well on the "same" platform as on the "different" platforms?<br> <br> <br>I very recently changed NT386 max_align from 32 to 64, and I believe<br>the remaining active platforms with max_align = 32 should also be 64.<br>It would "only" affect pickles with LONGINT or LONGFLOAT, as well<br>as "lining up" such structs with C.<br> <br> <br>Such alignment shold make us not need the extra "unaligned double" switch<br>on most platforms (some mystery still on some platforms) as well as<br>perhaps be needed for some atomic operations, esp. maybe on<br>LONGINT on 32bit x86.<br> <br> <br> - Jay<br><br> <br>> From:<span class="Apple-converted-space"> </span><a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a><br>> To:<span class="Apple-converted-space"> </span><a href="mailto:rodney_bates@lcwb.coop">rodney_bates@lcwb.coop</a><br>> Date: Sun, 31 Jan 2010 22:14:47 +0100<br>> CC:<span class="Apple-converted-space"> </span><a href="mailto:m3devel@elegosoft.com">m3devel@elegosoft.com</a><br>> Subject: Re: [M3devel] platform-independent packing/alignment?<br>><span class="Apple-converted-space"> </span><br>> I've not changed my code, that is for sure.... But now I am not sure<br>> some parent type (esp MUTEX here an there) was not changed... I'll take<br>> a look on this again sometime soon and report my findings.<br>><span class="Apple-converted-space"> </span><br>> Thanks for clues.<br>><span class="Apple-converted-space"> </span><br>> On Sun, 2010-01-31 at 14:00 -0600, Rodney M. Bates wrote:<br>> ><span class="Apple-converted-space"> </span><br>> > Dragiša Durić wrote:<br>> > > I've asked this before, but didn't catch answer:<br>> > ><span class="Apple-converted-space"> </span><br>> > > On Sun, 2010-01-31 at 12:21 +0000, Jay K wrote:<br>> > >> I suggest we can probably get by with platform-independent<br>> > >> packing/alignment settings.<br>> > ><span class="Apple-converted-space"> </span><br>> > > Some time ago I've used pickles (CM3) to save some data... My program<br>> > > does not read that pickle anymore....<span class="Apple-converted-space"> </span><br>> ><span class="Apple-converted-space"> </span><br>> > And you are certain your program that tries to read still contains<br>> > exact structurally equivalent types to all the types in the pickle?<br>> ><span class="Apple-converted-space"> </span><br>> > ><span class="Apple-converted-space"> </span><br>> > > Someone remembers moment when this incompatible changes were made?<span class="Apple-converted-space"> </span><br>> --<span class="Apple-converted-space"> </span><br>> Dragiša Durić <<a href="mailto:dragisha@m3w.org">dragisha@m3w.org</a>><br>><span class="Apple-converted-space"> </span><br></div></span></blockquote></div><br></div></body></html>