[MPlayer-cvslog] r33217 - trunk/gui/util/bitmap.c

Ingo Brückl ib at wupperonline.de
Wed Apr 6 16:18:12 CEST 2011


Clément Boesch wrote on Wed, 6 Apr 2011 09:12:57 +0200:

> 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 on Wed, 6 Apr 2011 09:23:27 +0200:

>> > And what's the point of the "static"? Is ext on the function's stack not ok?

> instead of writing each time the content of the array on
> the stack, it just uses the immediate static allocation:

Thanks a lot for your explanations. That made it clear.

Although I don't think that this additional space and code will count in this
case (there is probably more waste else) I'll change the definition. From
what I've learned,

  static const unsigned char ext[2][4] = { "png", "PNG" };

should express what is meant and be ok?

Ingo


More information about the MPlayer-cvslog mailing list