4.4 GCompareFunc

Callback: GCompareFunc

A procedure given for it is called as (procedure a) ⇒ %return. If the function that it is given to has no user data for it, it is also passed b, last.

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.

a

Passed: a foreign pointer, or #f.

a value

%return

Returned: a 32-bit integer.

negative value if a < b; zero if a = b; positive value if a > b

b

Not passed: it is the user data that guile-gi supplied.

a value to compare with