libCom/ellLib: make sort comparator args const pointers
This commit is contained in:
@@ -56,7 +56,7 @@ epicsShareFunc void ellInsert (ELLLIST *plist, ELLNODE *pPrev, ELLNODE *pNode);
|
||||
epicsShareFunc ELLNODE * ellNth (ELLLIST *pList, int nodeNum);
|
||||
epicsShareFunc ELLNODE * ellNStep (ELLNODE *pNode, int nStep);
|
||||
epicsShareFunc int ellFind (ELLLIST *pList, ELLNODE *pNode);
|
||||
typedef int (*pListCmp)(ELLNODE* A, ELLNODE* B);
|
||||
typedef int (*pListCmp)(const ELLNODE* A, const ELLNODE* B);
|
||||
epicsShareFunc void ellSortStable(ELLLIST *pList, pListCmp);
|
||||
epicsShareFunc void ellFree2 (ELLLIST *pList, FREEFUNC freeFunc);
|
||||
epicsShareFunc void ellVerify (ELLLIST *pList);
|
||||
|
||||
@@ -196,7 +196,7 @@ static void testList(void)
|
||||
|
||||
typedef struct { int A, B; } input_t;
|
||||
|
||||
static int myItemCmp(ELLNODE *a, ELLNODE *b)
|
||||
static int myItemCmp(const ELLNODE *a, const ELLNODE *b)
|
||||
{
|
||||
struct myItem *A = CONTAINER(a, struct myItem, node),
|
||||
*B = CONTAINER(b, struct myItem, node);
|
||||
|
||||
Reference in New Issue
Block a user