Re: [PATCH 00/13] Improved introspection support
- From: Víctor M. Jáquez L. <vjaquez igalia com>
- To: grilo-list gnome org
- Subject: Re: [PATCH 00/13] Improved introspection support
- Date: Fri, 30 Jul 2010 10:18:28 +0200
On Thu, Jul 29, 2010 at 12:20:40PM +0200, Juan A. Suarez Romero wrote:
> On Wed, 2010-07-28 at 23:06 +0200, Simón Pena wrote:
> > * Replacing alias defined with macros, as they can't be introspected,
> > using "inline" functions instead.
> >
> > This has been done in two steps: first, macros were replaced with
> > functions, which works fine. Then, those functions were marked as
> > "inline" following [1], declaring the functions with "extern", and
> > defining them with "inline".
>
>
> It is common use to declare and define inline functions in the same
> header file.
>
> You can find a lot of examples using google's code search.
>
> The good point about declaring them in .h instead of .c is that it
> resembles more to #defines, as you see the declaration and what it does
> in the same place.
>
> But I would like to hear other opinions.
In a quick glance, I found a couple issues:
1) You have to add the compiler flag -std=c99, because some gcc compilers
versions don't use c99 by default.
2) The inline functions are commonly used inlined :D, inside the .h file if
they are supposed to be exported. Take a look to this file used in gst-dsp:
http://github.com/felipec/gst-dsp/blob/master/dsp_bridge.h
vmjl
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]