[Geany-devel] debugger plugin

Thomas Martitz thomas.martitz at xxxxx
Wed Feb 9 18:16:35 UTC 2011


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".




More information about the Devel mailing list