Benno wrote:

> Doesn't fix the problem.  The implementation of the functions don't
> include.  the header with the shadowing. A more full example follows:
> 
> ### foo.h
> 
> int foo(int bar);
> 
> 
> ### foo.c
> 
> #include <foo.h>
> 
> int foo(int bar) { return bar * 2; }

You have to admit that this is a somewhat artifical example, but
lets ignore that for the moment.

if foo and bar are external libraries developed by different 
teams then all public functions should probably be named 
foo_whatever and bar_whatever. That will avoid the clash
in variable names as well. In the worst case you can probably 
find a way to wrap the names.

If OTOH foo and bar are are part of the same project then 
everything is under control and you have the power to fix 
things. If you have a test suite the job won't take more
than an hour even on large prjects. Once fixed you never
have to worry about the problem again.

Erik

-- 
+-----------------------------------------------------------+
  Erik de Castro Lopo  [EMAIL PROTECTED] (Yes it's valid)
+-----------------------------------------------------------+
When aiming for the common denominator, be prepared for the
occasional division by zero.
-- 
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to