From 4e55b3f0335c2aa658cd9d1fda4dea2a1f9ab80d Mon Sep 17 00:00:00 2001 From: Teodor Sigaev Date: Fri, 8 Apr 2016 12:02:45 +0300 Subject: [PATCH] Rename comparePos() to compareWordEntryPos() Rename comparePos() to compareWordEntryPos() to prevent export of too generic name. Per gripe from Tom Lane. --- src/backend/utils/adt/tsvector.c | 4 ++-- src/backend/utils/adt/tsvector_op.c | 2 +- src/include/tsearch/ts_type.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/backend/utils/adt/tsvector.c b/src/backend/utils/adt/tsvector.c index 2a26c46551..41bf3fb11e 100644 --- a/src/backend/utils/adt/tsvector.c +++ b/src/backend/utils/adt/tsvector.c @@ -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; diff --git a/src/backend/utils/adt/tsvector_op.c b/src/backend/utils/adt/tsvector_op.c index e363f2a023..d4fb0ff036 100644 --- a/src/backend/utils/adt/tsvector_op.c +++ b/src/backend/utils/adt/tsvector_op.c @@ -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; diff --git a/src/include/tsearch/ts_type.h b/src/include/tsearch/ts_type.h index 5f4e596193..ff3fef1f47 100644 --- a/src/include/tsearch/ts_type.h +++ b/src/include/tsearch/ts_type.h @@ -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 -- 2.40.0