help: is there any way to use integer 64 type in protocol?
Wang, Quanxian
quanxian.wang at intel.com
Sun Apr 20 18:36:09 PDT 2014
From: Jason Ekstrand [mailto:jason at jlekstrand.net]
Sent: Monday, April 21, 2014 6:32 AM
To: Pekka Paalanen
Cc: Wang, Quanxian; wayland-devel at lists.freedesktop.org
Subject: Re: help: is there any way to use integer 64 type in protocol?
On Sun, Apr 20, 2014 at 1:17 PM, Pekka Paalanen <ppaalanen at gmail.com<mailto:ppaalanen at gmail.com>> wrote:
On Sun, 20 Apr 2014 11:10:15 +0000
"Wang, Quanxian" <quanxian.wang at intel.com<mailto:quanxian.wang at intel.com>> wrote:
> Hi,
>
> Is there any way to use type of integer 64bit in protocol?
No. You will have to use two 32-bit arguments, or propose a patch
to add 64-bit types in a completely backwards-compatible way. I am
not sure what the latter option would entail.
Adding 64-bit types wouldn't be too hard. It would involve adding a int64_t an uint64_t types to wl_argument (I'd call them U and I personally) and adding code throughout libwayland to parse them. In terms of backwards compatibility, it should be fine as long as you make it 100% clear that your new protocol extension uses the new 64bit types and therefore requires the newer libwayland version.
The other option is that you could do what Pekka did in the presentation extension and split it into two 32-bit parts. What do you want to represent that needs a 64-bit type?
[Wang, Quanxian] 32 is too short. Currently I use 32bit in Weston randr, it could only stand for 16 type of operations (every type use 2 bits, however 12 of 16 have been used.). It will be fine to use 64 bit or more for future extension. I will try to add a patch for that. Thanks for your comment.
Thanks,
--Jason Ekstrand
The presentation extension could make use of a 64-bit type, too.
Thanks,
pq
_______________________________________________
wayland-devel mailing list
wayland-devel at lists.freedesktop.org<mailto:wayland-devel at lists.freedesktop.org>
http://lists.freedesktop.org/mailman/listinfo/wayland-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/wayland-devel/attachments/20140421/18a6a808/attachment.html>
More information about the wayland-devel
mailing list