[MPlayer-cvslog] r33217 - trunk/gui/util/bitmap.c
Clément Bœsch
ubitux at gmail.com
Wed Apr 6 09:12:57 CEST 2011
On Tue, Apr 05, 2011 at 09:53:56PM +0200, Ingo Brückl wrote:
> > There are two ok ways of writing it, though the first
> > is rather preferable (8 bytes size instead of up to 24):
> > static const char ext[][4] = { "png", "PNG" };
>
> I don't mind the [4] nor the const, but I don't understand why this makes a
> difference, because that's the sizes anyway.
>
I guess this is what happens in both cases:
ext[][] -> [p1][p2]
| `--> [P][N][G][\0]
v
[p][n][g][\0]
ext[][4] -> [p][n][g][\0][P][N][G][\0]
> And what's the point of the "static"? Is ext on the function's stack not ok?
>
Not exported symbol. Can be inlined in case of functions.
--
Clément B.
More information about the MPlayer-cvslog
mailing list