[FFmpeg-cvslog] r14484 - in trunk/libavcodec: audioconvert.c audioconvert.h
The Wanderer
inverseparadox
Sat Aug 2 03:20:46 CEST 2008
Michael Niedermayer wrote:
> On Fri, Aug 01, 2008 at 05:18:18PM -0400, The Wanderer wrote:
>
>> Michael Niedermayer wrote:
>>> Theres a difference between
>>> * every header musts somehow include its dependancies
>>
>> This is what I (currently believe I) am advocating.
>
> and i do not oppose the rule of
> "every header musts somehow include its dependancies"
>
>>> * every header must directly include its dependancies
>>
>> This is something which I may have supported in the past, and may
>> support again in the future, but am not presently terribly fond of.
>
> this ("every header must directly include its dependancies") is what
> i strongly oppose and what started this thread, peter removed a
> #include "avcodec.h" because it was already included by
> audioconvert.h and people started flaming about it ...
But he removed it from a .c file, not from a header. I suspect I believe
that the two should not necessarily be treated the same way.
My thoughts on this are (apparently) still evolving, but I think the
central question here revolves around whether a given header file is
*guaranteed*, either by documentation (or specification, etc.) or as a
side effect of its own requirements, to need a given other header file -
i.e., will audioconvert.h never cease to need some symbol from avcodec.h
and thus need to include it, or may it potentially some day not need any
such symbol and consequently cease to include that header?
If the first header will inevitably include the second, then including
the second while also including the first is redundant and
inappropriate. If the first header may or may not include the second,
then including both the second and the first is the appropriate thing to
do.
For the case of audioconvert.h and avcodec.h, that central question has
not been answered AFAIK. I held the opinion that the removal made sense,
because I also held an implicit assumption that audioconvert.h would
inevitably need avcodec.h. If that is not the case, then I would agree
that the removal should not have been done.
--
The Wanderer
Warning: Simply because I argue an issue does not mean I agree with any
side of it.
Secrecy is the beginning of tyranny.
More information about the ffmpeg-cvslog
mailing list