Re: gtk-doc and preprocessor statements



On Thu, 2007-05-31 at 21:38 -0400, Philip Kovacs wrote:
> I'm using gtk-doc 1.8.  Am I correct that gtk-doc cannot really
> use preprocessor statements to conditionally build certain parts
> of the documentation?  I am interested in forms such as this:
> 
> .h file:
> -------
> 
> #ifdef HAVE_FOO
> /**
>  * Foo:
>  * @param1: etc.
>  * @param2: etc.
>  *
>  * Description of Foo.
>  **/
> typedef void (*FooCallback) (void *param1, void *param2);
> #endif
> 
> (i.e. where the entire definition is omitted from the docs if HAVE_FOO
>  isn't defined).


gtk-doc doesn't do anything like that.

I'm not sure how useful it would be anyway. Wouldn't it be more useful
to include the function in the documentation and say that it is only
available where FOO is installed? Otherwise developers may use the
function and not realise it may not be available everywhere. Or if they
don't have FOO installed they may not know the function is available at
all.

Damon





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]