On Tue, Mar 08, 2011 at 08:20:29PM +1300, Aidan Gauland wrote:
> (parse-c-struct event-pointer
>                 (list uint8 uint8 uint8
>                       (list uint8 int int uint16 )))
>

It seemed to be an off-by-one(-byte) error.  There was padding to
align (to 32-bits, I think) the sub-struct.

This works on my 32-bit machine, but I suspect it is not portable.

(parse-c-struct event-pointer
                (list uint8 uint8 uint8 uint8 ; Padding
                      (list uint8 int int uint16 )))

What would be a better, portable solution?  I suspect the `alignof'
procedure is my friend here, but I don't understand how to use it.

--Aidan

Attachment: signature.asc
Description: Digital signature

Reply via email to