[FFmpeg-devel] [PATCH] FF_ARRAY_SIZE()
Aurelien Jacobs
aurel
Sat May 19 20:12:15 CEST 2007
On Sat, 19 May 2007 19:47:44 +0200
Michael Niedermayer <michaelni at gmx.at> wrote:
> Hi
>
> On Sat, May 19, 2007 at 06:49:35PM +0200, Aurelien Jacobs wrote:
> > On Sat, 19 May 2007 17:55:05 +0200
> > Reimar D?ffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> >
> > > Hello,
> > > On Sat, May 19, 2007 at 05:48:06PM +0200, Aurelien Jacobs wrote:
> > > > The attached patch adds a FF_ARRAY_SIZE() macro and uses it everywhere.
> > > > I think it's cleaner this way.
> > > > Ok to apply ?
> > >
> > > > +#define FF_ARRAY_SIZE(a) (sizeof(a)/sizeof(*a))
> > > > +#define FF_ARRAY_SIZE2(a) (sizeof(a)/sizeof(**a))
> > >
> > > IMO please think of a proper name for FF_ARRAY_SIZE2, the name is not at
> > > all descriptive.
> >
> > Ok, maybe FF_ARRAY_2D_SIZE would be better ?
> > (patch attached)
>
> iam mildly against these patches, they make it more difficult for a
> developer who isnt used to ffmpeg code to understand it ...
It sounded like a quite common macro to me.
For example there is a similar ARRAY_SIZE() macro in linux.
But well, I won't push much for this. That's not very important.
So the decision is up to you.
Aurel
More information about the ffmpeg-devel
mailing list