[MPlayer-cvslog] r33266 - in trunk/gui: cfg.c cfg.h

Reimar Döffinger Reimar.Doeffinger at gmx.de
Sat Apr 23 11:21:47 CEST 2011



On 23 Apr 2011, at 10:16, Ingo Brückl <ib at wupperonline.de> wrote:

> Diego Biurrun wrote on Mon, 18 Apr 2011 09:28:32 +0200:
> 
>> These #ifdefs around extern declarations are unnecessary.  Not only that,
>> but there was an effort in the past to get rid of all of them.
> 
> What's the desired approach for an extern with typedef?
> 
>  #ifdef CONFIG_ASS
>  typedef struct {
>      int enabled;
>      int use_margins;
>      int top_margin;
>      int bottom_margin;
>  } gtkASS_t;
> 
>  extern gtkASS_t gtkASS;
>  #endif
> 
> or without #ifdef?

Without. Only use ifdef if it can't be avoided or would increase binary size/reduce speed/make the code more complex significantly. Otherwise avoiding preprocessor means it's at least syntax-checked even for those who do not use the feature.


More information about the MPlayer-cvslog mailing list