<div dir="ltr">That's make this feature very not useful and unneeded.<br><br>If I have a C struct that has a non standard bit count, how can I make sure that I'll have the needed data on the right field, and without any segfult in the middle ?<br>
<br>Doesn't Pascal have something to offer me to deal with it ?<br><br>Ido<br><br clear="all"><a href="http://ik.homelinux.org/">http://ik.homelinux.org/</a><br>
<br><br><div class="gmail_quote">On Fri, Oct 23, 2009 at 10:21 PM, Jonas Maebe <span dir="ltr"><<a href="mailto:jonas.maebe@elis.ugent.be">jonas.maebe@elis.ugent.be</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
ik wrote on Fri, 23 Oct 2009:<div class="im"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
You can use bitpacked records:<br>
<br>
<a href="http://www.google.com/codesearch?hl=en&lr=&q=bitpacked+record+package%3Ahttp%3A%2F%2Fpasxlibbind" target="_blank">http://www.google.com/codesearch?hl=en&lr=&q=bitpacked+record+package%3Ahttp%3A%2F%2Fpasxlibbind</a><br>
\.googlecode\.com&sbtn=Search<br>
<br>
Here is an example on how I use it :)<br>
</blockquote>
<br></div>
No, you cannot use bitpacked records for C header translations. Bitpacked records are not guaranteed to have the same layout as in C (or even in different versions of FPC). If it works, you are lucky, and it will probably fail on some other platform or in another FPC version one day.<br>
<br>
The internal format of bitpacked records is opaque, and it is impossible to express the alignment requirements of C bitpacked structs or their internal fields with them.<br>
<br>
<br>
Jonas<br>
<br>
----------------------------------------------------------------<br>
This message was sent using IMP, the Internet Messaging Program.<div><div></div><div class="h5"><br>
<br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div><br></div>