[FFmpeg-cvslog] r8916 - in trunk/libavcodec: vc1.c vc1data.c vc1data.h

matthieu castet castet.matthieu
Sun May 6 22:38:52 CEST 2007


Rich Felker wrote:
> On Sun, May 06, 2007 at 03:06:17PM +0200, matthieu castet wrote:
>> Michael Niedermayer wrote:
>>> On Sun, May 06, 2007 at 01:40:42PM +0200, kostya wrote:
>>>
>>> a vc1_ prefix is insufficient for global variables, they should have
>>> a ffmpeg/libavcodec specific prefix, that is ff_ for internal variables
>>> a prefix like vc1_ or ac3_ would not prevent name clashes with other
>>> implementations of the same codec and such other implementations are the
>>> most likely things where name clashes would occur ...
>>>
>> As for better modularity more and more static variables become global. 
>> Couldn't we introduce a __attribute__visibility_hiden for the compilers 
>> that support it ?
> 
> No, all this does is allow bugs to slip through that result in broken
> builds on other platforms. Using nonportable hacks is not the way to
> fix namespace issues. It's like removing -Wall when you get a warning
> about code that's nonportable rather than fixing the code...
> 
What's the problem ?
For the other platforms it is the same than before :

 > Of course the variable should still prefixed
 >


Another solution, I saw in some libraries was to prefix the internal 
symbols with a random pattern that can be chosen by a define. It is 
portable, but for each internal declaration, you should do something 
like : `int INTERNAL_SYMBOL(foo);' which a bit ugly.


Matthieu







More information about the ffmpeg-cvslog mailing list