[cairo] inline functions
XinGang Li
slinavlee at gmail.com
Tue Apr 17 00:32:23 PDT 2007
2007/4/17, Behdad Esfahbod <behdad at behdad.org>:
>
> On Mon, 2007-04-16 at 22:35 -0400, XinGang Li wrote:
> > since 1.4.4, the __inline specifier of all the inline fuctions
> > replaced with inline. But for the msvc compiler we need to using
> > the __inline specifier for the c functions.
> >
> > This is a good way to fix this problem:
> >
> > Add below code to pixman.h:
> >
> > #if defined(_MSC_VER)
> > #define WARN_UNUSED_RESULT
> > #define inline __inline
> > #endif
>
>
> Thanks. I asked Pavlov and he thought inline should work... Anyway, in
> that case I need to put it back in cairoint.h too I guess.
>
> BTW, what is this __forceinline thing with MS compilers? There is this
> piece in fbmmx.c:
>
> #ifdef _MSC_VER
> #undef inline
> #define inline __forceinline
> #endif
>
>
> Should I leave it intact?
>
> --
> 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
>
>
>
>
I'm not sure it's a good thing to use __forceinline.
But may be should put it back to pixman.h.
BWT: For the MS compilers, we also need to define WARN_UNUSED_RESULT.
--
Li XinGang
EMail: slinavlee at gmail.com
Blog: avlee.cnblogs.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/cairo/attachments/20070417/4a5a1f3d/attachment-0001.html
More information about the cairo
mailing list