Re: [PATCH xserver 6/7] sync: Convert from "CARD64" to int64_t.

2017-08-03 Thread Keith Packard
Eric Anholt  writes:

> Keith Packard  writes:
>
>> [ Unknown signature status ]
>> Eric Anholt  writes:
>>
>>> The extension was using the name CARD64 to represent 64-bit values,
>>> with a #define from CARD64 to XSyncValue, a struct with a pair of
>>> 32-bit values representing a signed 64-bit value.  Now that stdint.h
>>> exists, let's just use that instead.
>>
>> Really, CARD64 was a *signed* value?
>
> Right?!

Wow.

In any case, this sure seems like a fine change

 @@ -822,7 +819,7 @@ SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * 
pAlarm, Mask mask,

  case XSyncCAValue:
  mask &= ~XSyncCAValue;
 -XSyncIntsToValue(>trigger.wait_value, values[1], 
values[0]);
 +pAlarm->trigger.wait_value = ((int64_t)values[0] << 32) | 
values[1];
  values += 2;
  break;

 @@ -834,7 +831,7 @@ SyncChangeAlarmAttributes(ClientPtr client, SyncAlarm * 
pAlarm, Mask mask,

  case XSyncCADelta:
  mask &= ~XSyncCADelta;
 -XSyncIntsToValue(>delta, values[1], values[0]);
 +pAlarm->delta = ((int64_t)values[1] << 32) | values[0];
  values += 2;
  break;

These are using the array in a different order; that seems wrong.

I didn't see any other issues of concern.

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 6/7] sync: Convert from "CARD64" to int64_t.

2017-08-03 Thread Eric Anholt
Keith Packard  writes:

> [ Unknown signature status ]
> Eric Anholt  writes:
>
>> The extension was using the name CARD64 to represent 64-bit values,
>> with a #define from CARD64 to XSyncValue, a struct with a pair of
>> 32-bit values representing a signed 64-bit value.  Now that stdint.h
>> exists, let's just use that instead.
>
> Really, CARD64 was a *signed* value?

Right?!


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel

Re: [PATCH xserver 6/7] sync: Convert from "CARD64" to int64_t.

2017-08-03 Thread Keith Packard
Eric Anholt  writes:

> The extension was using the name CARD64 to represent 64-bit values,
> with a #define from CARD64 to XSyncValue, a struct with a pair of
> 32-bit values representing a signed 64-bit value.  Now that stdint.h
> exists, let's just use that instead.

Really, CARD64 was a *signed* value?

-- 
-keith


signature.asc
Description: PGP signature
___
xorg-devel@lists.x.org: X.Org development
Archives: http://lists.x.org/archives/xorg-devel
Info: https://lists.x.org/mailman/listinfo/xorg-devel