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

Clément Bœsch ubitux at gmail.com
Wed Apr 6 09:32:58 CEST 2011


On Tue, Apr 05, 2011 at 09:53:56PM +0200, Ingo Brückl wrote:
> Reimar Döffinger wrote on Tue, 5 Apr 2011 18:37:51 +0200:
> 
> >> -    unsigned char ext[][6] = { ".png\0", ".PNG\0" };
> >> +    unsigned char *ext[] = { "png", "PNG" };
> 
> > These are not even remotely equivalent.
> 
> The new one isn't equivalent, but adequate. At least I thought so. (You
> noticed the change in the format from %s%s to %s.%s which I <shame>forgot
> to note</shame>?)
> 
> > The first uses 12 bytes,
> 
> Ok, that's clear.
> 
> > the second between 16 and 24.
> 
> Uh...why? An objdump of such a definition gives me: .data 00000008 ext, thus
> 8 bytes (as expected).
> 

I guess this is because you are in 32 bits and have 2x4B for each pointer.

but you have 2x4B for the pointers, and 2*4B for each strings. See
related mail with my awesome ascii art. You could have 24B in case of 64
bits (2x8B for pointers + 2x4B for the strings).

-- 
Clément B.


More information about the MPlayer-cvslog mailing list