[cairo] static inline C code in VC++
behdad at behdad.org
Fri Jan 18 16:28:39 PST 2008
On Fri, 2008-01-18 at 16:10 -0500, Antoine Azar wrote:
> Good catch. I'm not sure what's the desired software architecture, but
> cairo-boilerplate.c includes cairo-types-private.h which proudly
> /* This is the only header file not including cairoint.h. It only
> * typedefs.*/
> #include "cairo.h"
> #include "cairo-fixed-private.h"
> Including cairoint.h in cairo-fixed-private.h results in a bunch of
> hard to trace errors, in addition to not respecting the comment
> We could include cairoint.h in every file (cairo-boilerplate.c,
> cairo-boilerplate-ps.c, cairo-boilerplate-svg.c, etc) that might
> include cairo-fixed-private.h (and then any other file using inline
> but not already including cairoint.h), but that's really ugly. Maybe
> we should move these platform dependant #define to some other header
> file? seems like they're not really related to the rest of cairoint.h
Then the static inline prototypes need to move out of that file.
Possibly into cairoint.h. Which prototypes are we talking about?
> At 03:44 PM 1/18/2008, Carl Worth wrote:
> > On Fri, 18 Jan 2008 12:31:37 -0800, Vladimir Vukicevic wrote:
> > > Hm, at some point there was something like
> > > #ifdef _MSC_VER
> > > #define inline __inline
> > > #endif
> > I still see this in cairoint.h:
> > #ifdef _MSC_VER
> > #define snprintf _snprintf
> > #undef inline
> > #define inline __inline
> > #endif
> > Is something just failing to include that somewhere?
> > -Carl
> cairo mailing list
> cairo at cairographics.org
"Those who would give up Essential Liberty to purchase a little
Temporary Safety, deserve neither Liberty nor Safety."
-- Benjamin Franklin, 1759
More information about the cairo