[PATCH 09/11] include: add version_compare helper function

Jamey Sharp jamey at minilop.net
Wed May 11 18:21:49 PDT 2011


On Thu, May 12, 2011 at 11:08:24AM +1000, Peter Hutterer wrote:
> On Wed, May 11, 2011 at 02:40:39PM -0700, Jamey Sharp wrote:
> > This is definitely an improvement.
> > 
> > Reviewed-by: Jamey Sharp <jamey at minilop.net>
> > 
> > I'd suggest weakening the post-conditions of version_compare though, to
> > match the semantics of functions like strcmp: If a is less than b,
> > promise only that the return value is something less than 0, and
> > similarly for greater. That permits an implementation that simply
> > returns (a - b), provided that a and b both fit in 31 bits.
> 
> amended, see patch below.
> I added your Reviewed-by tag too, even though there were a bit of changes,
> please re-confirm though.

Yup, still good! At least until an extension has a major version greater
than 32767. :-)

Thanks,
Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.x.org/archives/xorg-devel/attachments/20110511/e7ea6018/attachment.pgp>


More information about the xorg-devel mailing list