[FFmpeg-devel] [PATCH] remove useless mm.c close function
Sun Aug 24 16:19:09 CEST 2008
On Sun, Aug 24, 2008 at 03:33:36PM +0200, Aurelien Jacobs wrote:
> Reimar D?ffinger wrote:
> > Hello,
> > admittedly not tested, but seems quite obvious.
> That indeed looks safe.
> I guess you can commit such trivial patches without asking.
> > Unrelated, but wasn't there a macro to do the standard
> > sizeof(arr)/sizeof(*arr) to get the number of array
> > elements? I've seen quite a few code places that could
> > use it - either to de-hardcode assumptions or to de-uglify..
> I proposed a patch a patch adding such a macro some times
> ago . But Michael was not fond of it.
> I still think it is a good idea. Maybe it's time to push
> it again ?
> My original patch (attached for reference) added two macro.
> One for 1D array and one for 2D array. The one for 2D
> array had a quite bad name and wasn't much used.
> So for now I propose only adding this macro:
> #define FF_ARRAY_SIZE(a) (sizeof(a)/sizeof(*a))
> Michael ? Are you still against this ? Strongly, or just a
> little bit ? ;-)
I have no strong oppinion on this specific case but overall there are
IMHO FAR too many macros in ffmpeg already, and we should try to reduce
their number not increase it.
Thus if this is added then id like to see at least 1 other macro removed
FF_ELEMENTS_IN() is much clearer than a SIZE that can be bytes or elements.
Iam also fine with any other non ambiguous name ...
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
No great genius has ever existed without some touch of madness. -- Aristotle
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
More information about the ffmpeg-devel