<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>On Feb 11, 2009, at 10:00 AM, Jean-Daniel Dupas wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><br><div><div>Le 11 févr. 09 à 18:12, Anders Carlsson a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div><br>11 feb 2009 kl. 09.02 skrev Fariborz Jahanian:<br><br><blockquote type="cite">They are the same, except for the 64bit-ness of types. Here it is:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">struct __builtin_CFString {<br></blockquote><blockquote type="cite">       const int *isa;          (will point at<br></blockquote><blockquote type="cite">__CFConstantStringClassReference)<br></blockquote><blockquote type="cite">       int flags;<br></blockquote><blockquote type="cite">       const char *str;<br></blockquote><blockquote type="cite">       long length;<br></blockquote><blockquote type="cite">     };<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">- Fariborz<br></blockquote><br>I did some testing of constant CFString/NSString layout in 64-bit and  <br>could not find any issues.<br><br>Anders<br></div></blockquote></div><br><div>OK, Look like auto padding from the compiler give the good struct, but the CF declaration is not the same for 32 and 64 bits:</div><div><br></div><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><span style="color: #aa0d91">typedef</span> <span style="color: #aa0d91">struct</span> __CFRuntimeBase {</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">    uintptr_t _cfisa;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">    uint8_t _cfinfo[<span style="color: #1c00cf">4</span>];</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(100, 56, 32); ">#if __LP64__</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">    uint32_t _rc;</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; color: rgb(100, 56, 32); ">#endif</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; ">} CFRuntimeBase;</div></div></div></blockquote><div><br class="webkit-block-placeholder"></div>Where do you get this declaration? I don;t see it in clang, /usr/include, (or gcc) source tree?</div><div><br class="webkit-block-placeholder"></div><div>- fariborz</div><div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; font: normal normal normal 10px/normal Monaco; "><br></div></div></div></blockquote></div><br></body></html>