From ae10ce8207ca4bf1b5cf3017d81f1e47795599e6 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Tue, 15 Feb 2005 21:00:52 +0000 Subject: [PATCH] const warning fixes git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6945 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/DOH/doh.h | 2 +- Source/DOH/list.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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;