[FFmpeg-devel] [PATCH] remove useless mm.c close function

Aurelien Jacobs aurel
Sun Aug 24 15:33:36 CEST 2008


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 [1]. 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 ? ;-)

Aurel

[1] http://thread.gmane.org/gmane.comp.video.ffmpeg.devel/50941
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ff_array_size.diff
Type: text/x-patch
Size: 11130 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20080824/d7c9e9fd/attachment.bin>



More information about the ffmpeg-devel mailing list