Rename comparePos() to compareWordEntryPos()

Rename comparePos() to compareWordEntryPos() to prevent export of too
generic name.

Per gripe from Tom Lane.
This commit is contained in:
Teodor Sigaev 2016-04-08 12:02:45 +03:00
parent 196b72fb9a
commit 4e55b3f033
3 changed files with 4 additions and 4 deletions

View File

@ -29,7 +29,7 @@ typedef struct
/* Compare two WordEntryPos values for qsort */
int
comparePos(const void *a, const void *b)
compareWordEntryPos(const void *a, const void *b)
{
int apos = WEP_GETPOS(*(const WordEntryPos *) a);
int bpos = WEP_GETPOS(*(const WordEntryPos *) b);
@ -54,7 +54,7 @@ uniquePos(WordEntryPos *a, int l)
if (l <= 1)
return l;
qsort((void *) a, l, sizeof(WordEntryPos), comparePos);
qsort((void *) a, l, sizeof(WordEntryPos), compareWordEntryPos);
res = a;
ptr = a + 1;

View File

@ -1216,7 +1216,7 @@ uniqueLongPos(WordEntryPos *pos, int npos)
if (npos <= 1)
return npos;
qsort((void *) pos, npos, sizeof(WordEntryPos), comparePos);
qsort((void *) pos, npos, sizeof(WordEntryPos), compareWordEntryPos);
result = pos;
pos_iter = pos + 1;

View File

@ -49,7 +49,7 @@ typedef struct
#define MAXSTRLEN ( (1<<11) - 1)
#define MAXSTRPOS ( (1<<20) - 1)
extern int comparePos(const void *a, const void *b);
extern int compareWordEntryPos(const void *a, const void *b);
/*
* Equivalent to