const warning fixes

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2005-02-15 21:00:52 +00:00
commit 5d657e01ae
2 changed files with 3 additions and 3 deletions

View file

@ -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

View file

@ -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;