[Spice-devel] [PATCH spice-gtk] main: use stable comparison function for monitors
Christophe Fergeau
cfergeau at redhat.com
Thu Feb 28 08:50:13 PST 2013
On Thu, Feb 28, 2013 at 10:14:46AM +0100, Hans de Goede wrote:
> On 02/20/2013 06:09 PM, Hans de Goede wrote:
> >On 02/20/2013 11:35 AM, Marc-André Lureau wrote:
> >I think that should be: "(char*)p2 - (char*)p1" So that if the
> >address of p2 is bigger they compare as p2 > p1, and qsort will
> >keep the order of the array the same for monitors with identical
> >coordinates.
>
> After further discussion, it turns out I'm wrong. So ACK for the patch
> as is.
Having a summary of why this is right or wrong would be helful to have in
the list archive if anyone (even you or Marc-Andre) wonder why this was
done this way in a few months from now ;)
Christophe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/spice-devel/attachments/20130228/3e7c5ea9/attachment.pgp>
More information about the Spice-devel
mailing list