[FFmpeg-devel] [PATCH] FF_ARRAY_SIZE()

Aurelien Jacobs aurel
Sat May 19 18:49:35 CEST 2007


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)

Aurel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ff_array_size.diff
Type: text/x-diff
Size: 11136 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070519/b2113016/attachment.diff>



More information about the ffmpeg-devel mailing list