[PATCH libXi] 1UL may be 4 bytes, force to 1ULL

Daniel Stone daniel at fooishbar.org
Mon Oct 3 03:12:59 PDT 2011


On 3 October 2011 06:06, Jeremy Huddleston <jeremyhu at apple.com> wrote:
> On Oct 2, 2011, at 16:30, Peter Hutterer wrote:
>> On Sun, Oct 02, 2011 at 10:52:03AM -0700, Jamey Sharp wrote:
>>> And I think ldexp is a much better idea than either. :-) It's more
>>> clear, and as an added bonus, probably faster. (You can multiply a
>>> double by a power of two just by adding the exponents. Division by an
>>> arbitrary constant is stupidly slow by comparison.)


>>> To me, the interesting part of Jeremy's question was whether helper
>>> functions are worthwhile for these conversions,
>> yes.

Indeed, I'd missed that, sorry.

>>> and if so, where they should live.
>> preferably not in in the protocol. it exposes us to more bugs in the
>> protocol headers (which in theory should be static). And since they're
>> built-in updating them in case a bug is found is harder, you'll need to
>> rebuild anything that uses the headers, simply updating the component isn't
>> enough (that's from a distro POV).
>> tbh, that's one case where I'd accept duplicate implementations in the
>> server and libX*.
> Yeah, with my port maintainer hat on, a bug in a proto header like that would be *incredibly* annoying to push out.  I like the idea of them living as static functions in libXi and the server.

Sounds good to me.


More information about the xorg-devel mailing list