Skip to content

Commit 4e55b3f

Browse files
committed
Rename comparePos() to compareWordEntryPos()
Rename comparePos() to compareWordEntryPos() to prevent export of too generic name. Per gripe from Tom Lane.
1 parent 196b72f commit 4e55b3f

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/backend/utils/adt/tsvector.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ typedef struct
2929

3030
/* Compare two WordEntryPos values for qsort */
3131
int
32-
comparePos(const void *a, const void *b)
32+
compareWordEntryPos(const void *a, const void *b)
3333
{
3434
int apos = WEP_GETPOS(*(const WordEntryPos *) a);
3535
int bpos = WEP_GETPOS(*(const WordEntryPos *) b);
@@ -54,7 +54,7 @@ uniquePos(WordEntryPos *a, int l)
5454
if (l <= 1)
5555
return l;
5656

57-
qsort((void *) a, l, sizeof(WordEntryPos), comparePos);
57+
qsort((void *) a, l, sizeof(WordEntryPos), compareWordEntryPos);
5858

5959
res = a;
6060
ptr = a + 1;

src/backend/utils/adt/tsvector_op.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1216,7 +1216,7 @@ uniqueLongPos(WordEntryPos *pos, int npos)
12161216
if (npos <= 1)
12171217
return npos;
12181218

1219-
qsort((void *) pos, npos, sizeof(WordEntryPos), comparePos);
1219+
qsort((void *) pos, npos, sizeof(WordEntryPos), compareWordEntryPos);
12201220

12211221
result = pos;
12221222
pos_iter = pos + 1;

src/include/tsearch/ts_type.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ typedef struct
4949
#define MAXSTRLEN ( (1<<11) - 1)
5050
#define MAXSTRPOS ( (1<<20) - 1)
5151

52-
extern int comparePos(const void *a, const void *b);
52+
extern int compareWordEntryPos(const void *a, const void *b);
5353

5454
/*
5555
* Equivalent to

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy