<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 20, 2014 at 8:36 PM, Wang, Quanxian <span dir="ltr"><<a href="mailto:quanxian.wang@intel.com" target="_blank">quanxian.wang@intel.com</a>></span> wrote:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">





<div link="blue" vlink="purple" lang="EN-US">
<div>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></p>
<p class="MsoNormal"><a name="14584af024781f8a_14581ed946e2bfbf__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<p class="MsoNormal"><b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif"">From:</span></b><span style="font-size:11.0pt;font-family:"Calibri","sans-serif""> Jason Ekstrand [mailto:<a href="mailto:jason@jlekstrand.net" target="_blank">jason@jlekstrand.net</a>]
<br>
<b>Sent:</b> Monday, April 21, 2014 6:32 AM<br>
<b>To:</b> Pekka Paalanen<br>
<b>Cc:</b> Wang, Quanxian; <a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<b>Subject:</b> Re: help: is there any way to use integer 64 type in protocol?<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><u></u> <u></u></p>
<div><div>
<p class="MsoNormal">On Sun, Apr 20, 2014 at 1:17 PM, Pekka Paalanen <<a href="mailto:ppaalanen@gmail.com" target="_blank">ppaalanen@gmail.com</a>> wrote:<u></u><u></u></p>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">On Sun, 20 Apr 2014 11:10:15 +0000<br>
"Wang, Quanxian" <<a href="mailto:quanxian.wang@intel.com" target="_blank">quanxian.wang@intel.com</a>> wrote:<br>
<br>
> Hi,<br>
><br>
> Is there any way to use type of integer 64bit in protocol?<u></u><u></u></p>
</div>
<p class="MsoNormal">No. You will have to use two 32-bit arguments, or propose a patch<br>
to add 64-bit types in a completely backwards-compatible way. I am<br>
not sure what the latter option would entail.<u></u><u></u></p>
</blockquote>
<div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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.<u></u><u></u></p>
</div>
</div><div><div>
<p class="MsoNormal" style="margin-bottom:12.0pt">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?<u></u><u></u></p>


</div><p class="MsoNormal" style="margin-bottom:12.0pt"><b><i><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">[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.</span></i></b></p></div></div></div></div></div>

</div></blockquote><div>As Thiago pointed out, we can't actually add that at this point (sorry, I forgot about the 32-bit machine issue).  Also, if you're using a bitfield and you think there's a reasonable chance of 32 bits being too small, then there is probably also a reasonable chance of 64 bits being too small.  It might be a good idea to consider other ways of representing it.  What exactly are you representing in this bitfield?<br>
<br></div><div>Thanks,<br></div><div>--Jason Ekstrand<br>
</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div link="blue" vlink="purple" lang="EN-US"><div><div><div><div><div><p class="MsoNormal" style="margin-bottom:12.0pt">

<span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u><u></u></span></p>
</div><div>
<div>
<p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">--Jason Ekstrand<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"> <u></u><u></u></p>
</div>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
The presentation extension could make use of a 64-bit type, too. <u></u><u></u></p>
</blockquote>
<blockquote style="border:none;border-left:solid #cccccc 1.0pt;padding:0in 0in 0in 6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
<br>
Thanks,<br>
pq<br>
_______________________________________________<br>
wayland-devel mailing list<br>
<a href="mailto:wayland-devel@lists.freedesktop.org" target="_blank">wayland-devel@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/wayland-devel" target="_blank">http://lists.freedesktop.org/mailman/listinfo/wayland-devel</a><u></u><u></u></p>
</blockquote>
</div></div>
<p class="MsoNormal"><u></u> <u></u></p>
</div>
</div>
</div>
</div>

</blockquote></div><br></div></div>