[cairo] CAIROMM: Status type and Xlib
Jim Gettys
jg at freedesktop.org
Sat Jan 14 17:28:36 PST 2006
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.
#undef is your friend.
- Jim
More information about the cairo
mailing list