[MPlayer-dev-eng] [PATCH] x11_common: XChangeProperty uses long for 32-bits

Ingo Brückl ib at wupperonline.de
Fri Aug 19 09:52:27 CEST 2011


Alexander Strasser wrote on Thu, 18 Aug 2011 18:50:17 +0200:

> Hi Ingo!

> Ingo Brückl wrote:
>> Alexander Strasser wrote on Wed, 17 Aug 2011 19:35:17 +0200:
>>
>> >> long prop = pid;
>>
>> >   Also if someone sees where this approach could be seriously
>> > flawed, please speak up.
>>
>> I try to ask again, although my first comment was in reply to Nicolas George.
>>
>> Shouldn't it be:
>>
>>   CARD32 prop = pid;
>>
>> >From what I understand when looking at the X11 header files, CARD32 is the
>> data type to be used for XA_CARDINAL, 32. CARD32 is long on 32-bit and int on
>> 64-bit machines.

>   That type must be long! Please read the XChangeProperty documentation

I did, and this is what confuses me. The documentation says:

format    Specifies whether the data should be viewed as a list of
          8-bit, 16-bit, or 32-bit quantities. Possible values are
          8, 16, and 32.

CARD32 always is a 32-bit quantity, while "long" on 64-bit machines isn't.
So why "long"?

Ingo


More information about the MPlayer-dev-eng mailing list