File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change 13
13
/* In-place, iterative heapsort with an interface matching glibc's qsort_r. This
14
14
* is preferred over standard library implementations because they generally
15
15
* make no guarantee about being fast for malicious inputs.
16
- * Remeber that heapsort is unstable.
16
+ * Remember that heapsort is unstable.
17
17
*
18
- * See the qsort_r manpage for a description of the interface.
18
+ * In/Out: ptr: pointer to the array to sort. The contents of the array are
19
+ * sorted in ascending order according to the comparison function.
20
+ * In: count: number of elements in the array.
21
+ * size: size in bytes of each element.
22
+ * cmp: pointer to a comparison function that is called with two
23
+ * arguments that point to the objects being compared. The cmp_data
24
+ * argument of secp256k1_hsort is passed as third argument. The
25
+ * function must return an integer less than, equal to, or greater
26
+ * than zero if the first argument is considered to be respectively
27
+ * less than, equal to, or greater than the second.
28
+ * cmp_data: pointer passed as third argument to cmp.
19
29
*/
20
30
static void secp256k1_hsort (void * ptr , size_t count , size_t size ,
21
31
int (* cmp )(const void * , const void * , void * ),
You can’t perform that action at this time.
0 commit comments