Function

GLibCompareDataFunc

Declaration

gint
(* GCompareDataFunc) (
  gconstpointer a,
  gconstpointer b,
  gpointer user_data
)

Description

Specifies the type of a comparison function used to compare two values. The function should return a negative integer if the first value comes before the second, 0 if they are equal, or a positive integer if the first value comes after the second.

Parameters

a gconstpointer
 

A value.

 The argument can be NULL.
 The data is owned by the caller of the function.
b gconstpointer
 

A value to compare with.

 The argument can be NULL.
 The data is owned by the caller of the function.
user_data gpointer
 

User data.

 The argument can be NULL.
 The data is owned by the caller of the function.

Return value

Returns: gint
 

Negative value if a < b; zero if a = b; positive value if a > b.