diff options
Diffstat (limited to 'manual/search.texi')
-rw-r--r-- | manual/search.texi | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/manual/search.texi b/manual/search.texi index b43153a44b..f561ef9e34 100644 --- a/manual/search.texi +++ b/manual/search.texi @@ -39,9 +39,12 @@ numbers of type @code{double}: @smallexample int -compare_doubles (const double *a, const double *b) +compare_doubles (const void *a, const void *b) @{ - return (int) (*a - *b); + const double *da = (const double *) a; + const double *db = (const double *) b; + + return (*da > *db) - (*da < *db); @} @end smallexample |