diff options
author | Peter Eisentraut <peter_e@gmx.net> | 2012-06-25 01:51:46 +0300 |
---|---|---|
committer | Peter Eisentraut <peter_e@gmx.net> | 2012-06-25 01:51:46 +0300 |
commit | b8b2e3b2deeaab19715af063fc009b7c230b2336 (patch) | |
tree | c6ee1310487d59e37e3e143835b5609e78524f65 /src/backend/utils/adt/tsrank.c | |
parent | 7eb8c7851458eb88def80c290a4b5bc37cc321f3 (diff) |
Replace int2/int4 in C code with int16/int32
The latter was already the dominant use, and it's preferable because
in C the convention is that intXX means XX bits. Therefore, allowing
mixed use of int2, int4, int8, int16, int32 is obviously confusing.
Remove the typedefs for int2 and int4 for now. They don't seem to be
widely used outside of the PostgreSQL source tree, and the few uses
can probably be cleaned up by the time this ships.
Diffstat (limited to 'src/backend/utils/adt/tsrank.c')
-rw-r--r-- | src/backend/utils/adt/tsrank.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/backend/utils/adt/tsrank.c b/src/backend/utils/adt/tsrank.c index a45caf05af5..acda098db1a 100644 --- a/src/backend/utils/adt/tsrank.c +++ b/src/backend/utils/adt/tsrank.c @@ -40,7 +40,7 @@ static float calc_rank_and(float *w, TSVector t, TSQuery q); * Returns a weight of a word collocation */ static float4 -word_distance(int4 w) +word_distance(int32 w) { if (w > 100) return 1e-30f; @@ -213,7 +213,7 @@ calc_rank_and(float *w, TSVector t, TSQuery q) *firstentry; WordEntryPos *post, *ct; - int4 dimt, + int32 dimt, lenct, dist, nitem; @@ -283,7 +283,7 @@ calc_rank_or(float *w, TSVector t, TSQuery q) WordEntry *entry, *firstentry; WordEntryPos *post; - int4 dimt, + int32 dimt, j, i, nitem; @@ -297,7 +297,7 @@ calc_rank_or(float *w, TSVector t, TSQuery q) { float resj, wjm; - int4 jm; + int32 jm; firstentry = entry = find_wordentry(t, q, item[i], &nitem); if (!entry) @@ -347,7 +347,7 @@ calc_rank_or(float *w, TSVector t, TSQuery q) } static float -calc_rank(float *w, TSVector t, TSQuery q, int4 method) +calc_rank(float *w, TSVector t, TSQuery q, int32 method) { QueryItem *item = GETQUERY(q); float res = 0.0; @@ -621,7 +621,7 @@ get_docrep(TSVector txt, QueryRepresentation *qr, int *doclen) WordEntry *entry, *firstentry; WordEntryPos *post; - int4 dimt, + int32 dimt, j, i, nitem; |