[cairo] Using bit fields a bit more in cairo

David Turner david at freetype.org
Wed Dec 20 01:39:54 PST 2006


> 
> All agreed.  I don't see any reason not to use bitfields.  We use them
> in Pango in public api and never had any problem that I know of.
>
Probably because you don't do much cross-platform work, or more precisely
because you only use the same compiler on all platforms you compile your
code and is used.

I have at least one war story about bit-fields introducing strange bugs
when a DLL compiled with one compiler was used with code compiled by
another one.

bitfields in public APIs can be dangerous. There is no problem using them
internally though.

Regards,

- David

> 
> -- 
> behdad
> http://behdad.org/
> 
> "Those who would give up Essential Liberty to purchase a little
>  Temporary Safety, deserve neither Liberty nor Safety."
>         -- Benjamin Franklin, 1759
> 
> 
> 
> _______________________________________________
> cairo mailing list
> cairo at cairographics.org
> http://cairographics.org/cgi-bin/mailman/listinfo/cairo


More information about the cairo mailing list