[cairo] fix alignment issue on SPARC processors

Martin Husemann martin at duskware.de
Thu Dec 4 23:10:12 PST 2014


On Thu, Dec 04, 2014 at 06:39:10PM +0100, Uli Schlachter wrote:
> I would instead suggest to add a new member "int64_t data" to the struct with a
> suitable comment explaining why it is of type int64_t. Instead of using
> ((unsigned char *)chunk + sizeof(*chunk)) for calculating the beginning of the
> data area of the chunk, the code could then use (unsigned char*)&chunk->data
> which IMO is more readable anyway.

This is the better way (and the data could also be a union member if it is not
used elsewhere).

Martin


More information about the cairo mailing list