[FFmpeg-cvslog] r12246 - in trunk: configure libavcodec/avcodec.h libavdevice/avdevice.h libavformat/avformat.h libavutil/avutil.h libpostproc/postprocess.h

Michael Niedermayer michaelni
Thu Feb 28 03:10:19 CET 2008


On Thu, Feb 28, 2008 at 12:32:06AM +0000, M?ns Rullg?rd wrote:
> Michael Niedermayer <michaelni at gmx.at> writes:
> 
> > On Wed, Feb 27, 2008 at 11:05:53PM +0000, M?ns Rullg?rd wrote:
> >> Diego Biurrun <diego at biurrun.de> writes:
> >> 
> >> > On Tue, Feb 26, 2008 at 09:37:59PM +0100, mru wrote:
> >> >> 
> >> >> Log:
> >> >> less preprocessor magic in version number macros
> >> >> 
> >> >> --- trunk/libavutil/avutil.h	(original)
> >> >> +++ trunk/libavutil/avutil.h	Tue Feb 26 21:37:59 2008
> >> >> @@ -30,16 +30,20 @@
> >> >>  
> >> >> +#define AV_VERSION_INT(a, b, c) (a<<16 | b<<8 | c)
> >> >> +#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
> >> >> +#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
> >> >
> >> > Why the indirection with AV_VERSION_DOT?
> >> 
> >> Otherwise you get LIBAVCODEC_VERSION defined as 51 . 50 . 1 (note the
> >> spaces), which is not what we want.  It's our saving grace that a C
> >> "preprocessor number" can contain any number of dots (but only one at
> >> a time).
> >
> > Yes, but if it were a string (yes theoretic API break) we could use
> > AV_STRINGIFY() and avoid these 3 macros above.
> 
> People are using those macros.  If you don't believe me, go google it
> yourself.  In other instances, you to great lengths to avoid breaking
> API.  What makes you dislike a couple of macros so badly that you are
> willing to sacrifice API compatibility to get rid of them?

Because they are complicated, jeff downs, diego and myself failed
to realize that ## wouldnt work out without the extra macros. (and
hey i did know how the token concat works i just somehow overlooked it
when i looked at jeffs patch ...)
I really think this code will confuse people.
Anyway its how its done now, and iam fine with it, i just dont think its
better then the good old original duplicated version. Either way we
should stop wasting time about this there are more important things to
work on ...

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-cvslog/attachments/20080228/2ee0a016/attachment.pgp>



More information about the ffmpeg-cvslog mailing list