[cairo] static inline C code in VC++

Antoine Azar cairo at antoineazar.com
Fri Jan 18 13:10:42 PST 2008


Good catch. I'm not sure what's the desired software architecture, 
but cairo-boilerplate.c includes cairo-types-private.h which proudly announces:

/* This is the only header file not including cairoint.h.  It only contains
  * 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 above.

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 anyway.

Antoine

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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20080118/d562038c/attachment.htm 


More information about the cairo mailing list