diff --git a/include/ucore/heapsort.h b/include/ucore/heapsort.h index d6c9a57..fcaf426 100644 --- a/include/ucore/heapsort.h +++ b/include/ucore/heapsort.h @@ -7,10 +7,10 @@ extern "C" { #endif ///compare function. Needs only to return < 0 if -//the first element is less than the second -typedef int (*uc_hs_cmp)(const void *, const void *, void *cookie); -//swap function -typedef void (*uc_hs_swp)(void *, void *); +//a is less tan b +typedef int (*uc_hs_cmp)(const void *a, const void *b, void *cookie); +//swap function, must swap around element a and b +typedef void (*uc_hs_swp)(void *a, void *b); /** Sort an array. * @param base start of array