[Pixman] [PATCH 7/7] Add bswap() macros and use them

Soeren Sandmann sandmann at daimi.au.dk
Mon May 3 08:27:22 PDT 2010


Jeff Muizelaar <jmuizelaar at mozilla.com> writes:

> These macros reuse their value which makes them prone to bugs like:
> 
> cairo: ce3ad6f41edf86ed6914f4d7f364111eba42ca65
> 
> We should either use inline functions or trickier macros.

Yeah, good catch.

It probably would make sense to take the macros that Alan pointed out,
convert them to inline functions, then use those. I guess one question
is if we can rely on the system macros to not evaluate their arguments
in this manner. The ones on Linux seem to be fine, but I don't know
about other systems.


Soren


More information about the Pixman mailing list