[FFmpeg-devel] Moving if(constant expression) to preprocessor?

Axel Holzinger aholzinger
Mon Sep 20 00:02:23 CEST 2010

Ronald S. Bultje wrote:
> Hi,
> On Sun, Sep 19, 2010 at 4:48 PM, Luca Barbato 
> <lu_zero at gentoo.org> wrote:
> > On 09/19/2010 09:38 PM, Axel Holzinger wrote:
> >>> $ cat foo.c
> >>> > #define AV_IF_0(t, f) f
> >>> > #define AV_IF_1(t, f) t
> >>> > #define AV_IF(c, t, f) ?AV_IF2(c, t, f) #define AV_IF2(c, t,
> >>> > AV_IF_##c(t, f)
> >> Smaller and simpler, perfect. I'm fine with that and works for
> >
> > You can use it on your own and see how and when it breaks...
> Yeah, this boggles my mind a little bit, why go through this 
> huge flamewar if all you're doing is debugging some stuff in 
> a build you never intend to distribute? Why not just make 
> this tiny local modification and revert to main SVN once your 
> debugging is done? All this seems like a waste of time...

It makes life harder, as it means to maintain local patches to a bunch
of files and naive me thought a straight forward solution even making
the code more independent from build specifics might be welcome.

More information about the ffmpeg-devel mailing list