[Haskell-cafe] Storable class?

Sebastian Sylvan sebastian.sylvan at gmail.com
Tue Apr 22 17:04:33 EDT 2008


On Tue, Apr 22, 2008 at 9:29 PM, Evan Laforge <qdunkan at gmail.com> wrote:

> This uses hsc2hs.  As far as I can tell, alignment is unused.  I've
> never had an error from using 'undefined' there.


Some architectures require all sorts of wacky alignments. E.g. floats may
need to be 4 byte aligned, so it's very important that you don't poke a
single byte, and then a float, you need to pad with 3 empty bytes first
(assuming the whole structure starts at a 4 byte alignment).



-- 
Sebastian Sylvan
+44(0)7857-300802
UIN: 44640862
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080422/4fbd414b/attachment.htm


More information about the Haskell-Cafe mailing list