[cairo] CAIROMM: Status type and Xlib

Murray Cumming murrayc at murrayc.com
Tue Jan 24 02:17:14 PST 2006


On Sun, 2006-01-15 at 09:28 +0800, Jim Gettys wrote:
> On Thu, 2006-01-12 at 08:41 -0600, Jonathon Jongsma wrote:
> > In experimenting with implementing a heirarchy of surfaces in cairomm,
> > I've run across a problem that took me a while to track down.  cairomm
> > typedefs cairo_status_t as Cairo::Status.  This was working fine until
> > I added support for XlibSurface, which needs to pull in a bunch of
> > xlib headers.  The problem is that Xlib.h contains the line:
> > 
> > #define Status int
> > 
> > So any Status type that occurs after Xlib.h is included gets replaced
> > by the preprocessor with 'int'.  I don't know why it's a #define
> > instead of a typedef.  
> 
> Hysterical reasons: typedef wasn't available universally at the time
> that line was written, IIRC.

Can't we fix that now? It doesn't seem to be an API or ABI change.

However, Xlib.h has all kinds of other awful non-namespaced crap in it,
which can't be fixed without breaking its API. I guess that we should
keep Xlib.h out of the public cairo headers if possible.
 
-- 
Murray Cumming
murrayc at murrayc.com
www.murrayc.com
www.openismus.com



More information about the cairo mailing list