const warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
07748b6b52
commit
ae10ce8207
2 changed files with 3 additions and 3 deletions
|
|
@ -292,7 +292,7 @@ extern int DohCopyto(DOHFile *input, DOHFile *output);
|
||||||
* ----------------------------------------------------------------------------- */
|
* ----------------------------------------------------------------------------- */
|
||||||
|
|
||||||
extern DOHList *DohNewList();
|
extern DOHList *DohNewList();
|
||||||
extern void DohSortList(DOH *lo, int (*cmp)(DOH *, DOH *));
|
extern void DohSortList(DOH *lo, int (*cmp)(const DOH *, const DOH *));
|
||||||
|
|
||||||
/* -----------------------------------------------------------------------------
|
/* -----------------------------------------------------------------------------
|
||||||
* Hash
|
* Hash
|
||||||
|
|
|
||||||
|
|
@ -361,13 +361,13 @@ DohNewList() {
|
||||||
return DohObjMalloc(&DohListType,l);
|
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) {
|
static int List_qsort_compare(const void *a, const void *b) {
|
||||||
return List_sort_compare_func(*((DOH **)a), *((DOH **)b));
|
return List_sort_compare_func(*((DOH **)a), *((DOH **)b));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sort a list */
|
/* 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);
|
List *l = (List *) ObjData(lo);
|
||||||
if (cmp) {
|
if (cmp) {
|
||||||
List_sort_compare_func = cmp;
|
List_sort_compare_func = cmp;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue