[Geany-devel] debugger plugin
Chow Loong Jin
hyperair at xxxxx
Wed Feb 9 23:55:52 UTC 2011
On Thursday 10,February,2011 02:16 AM, Thomas Martitz wrote:
> Am 09.02.2011 17:57, schrieb Chow Loong Jin:
>
>> gint compare_func(gconstpointer a, gconstpointer b, gpointer user_data)
>> {
>> - if (a == b)
>> + gint ia = GPOINTER_TO_INT(a);
>> + gint ib = GPOINTER_TO_INT(b);
>> + if (ia == ib)
>> return 0;
>> else
>> - return a> b ? 1 : -1;
>> + return ia> ib ? 1 : -1;
>> }
>
> FWIW, this can be replaced with "return ia - ib".
Ooh cool, I didn't think of that. Thanks for the tip! Here's a revised patch.
--
Kind regards,
Loong Jin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Fix-integer-size-mismatch-while-casting.patch
Type: text/x-patch
Size: 3665 bytes
Desc: not available
URL: <http://lists.geany.org/pipermail/devel/attachments/20110210/c5f39d40/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 262 bytes
Desc: OpenPGP digital signature
URL: <http://lists.geany.org/pipermail/devel/attachments/20110210/c5f39d40/attachment.pgp>
More information about the Devel
mailing list