[FFmpeg-devel] [PATCH] GET_RL_VLC can hide function parameters

Måns Rullgård mans
Wed Jul 23 22:08:17 CEST 2008

"Ivan Kalvachev" <ikalvachev at gmail.com> writes:

> On 7/22/08, Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
>> On Tue, Jul 22, 2008 at 09:10:22AM -0700, Erik Hovland wrote:
>>> On Tue, Jul 22, 2008 at 04:24:49PM +0100, M?ns Rullg?rd wrote:
>>> > >> Wouldn't it be better to change the GET_RL_VLC macro to use names
>>> > >> less
>>> > >> likely to clash?
>>> > >
>>> > > That is what the patch does. Is length too common as well?
>>> >
>>> > I'd be inclined to say yes.
>>> Patch resubmitted with n changed to vlc_length.
>> If the goal is to avoid clashes, this kind of change is simply
>> pointless, and also doing it only to one variable is not that
>> helpful.
> Can somebody explain me what kind of clashes are you talking about?
> The macro is block on its own and the variable is local to this block.
> There is absolutely no problem if variable "n" is used outside this
> block, as it is different than the one defined inside the block and
> the compiler have no problem distinguishing both.

It would become a problem if a caller passed "n" as one of the
arguments to the macro.  As far as I know, this is not the case

> I thought this is basic C stuff. Maybe our experts can find the exact
> description?

It is basic C stuff.  Some people just like to impose stupid
restrictions.  Try working for a (semi-)large company some time, and
see how long you last.

M?ns Rullg?rd
mans at mansr.com

More information about the ffmpeg-devel mailing list