diff --git a/Source/DOH/doh.h b/Source/DOH/doh.h index 043b979c4..96ed12667 100644 --- a/Source/DOH/doh.h +++ b/Source/DOH/doh.h @@ -292,7 +292,7 @@ extern int DohCopyto(DOHFile *input, DOHFile *output); * ----------------------------------------------------------------------------- */ extern DOHList *DohNewList(); -extern void DohSortList(DOH *lo, int (*cmp)(DOH *, DOH *)); +extern void DohSortList(DOH *lo, int (*cmp)(const DOH *, const DOH *)); /* ----------------------------------------------------------------------------- * Hash diff --git a/Source/DOH/list.c b/Source/DOH/list.c index bd909f596..9c3ab2038 100644 --- a/Source/DOH/list.c +++ b/Source/DOH/list.c @@ -361,13 +361,13 @@ DohNewList() { return DohObjMalloc(&DohListType,l); } -static int (*List_sort_compare_func)(DOH *, DOH *); +static int (*List_sort_compare_func)(const DOH *, const DOH *); static int List_qsort_compare(const void *a, const void *b) { return List_sort_compare_func(*((DOH **)a), *((DOH **)b)); } /* Sort a list */ -void DohSortList(DOH *lo, int (*cmp)(DOH *, DOH *)) { +void DohSortList(DOH *lo, int (*cmp)(const DOH *, const DOH *)) { List *l = (List *) ObjData(lo); if (cmp) { List_sort_compare_func = cmp;