diff options
author | Peter Eisentraut | 2012-06-24 22:51:46 +0000 |
---|---|---|
committer | Peter Eisentraut | 2012-06-24 22:51:46 +0000 |
commit | b8b2e3b2deeaab19715af063fc009b7c230b2336 (patch) | |
tree | c6ee1310487d59e37e3e143835b5609e78524f65 /contrib/ltree/ltree_gist.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 'contrib/ltree/ltree_gist.c')
-rw-r--r-- | contrib/ltree/ltree_gist.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/contrib/ltree/ltree_gist.c b/contrib/ltree/ltree_gist.c index 13d96656d2e..5324c65f59e 100644 --- a/contrib/ltree/ltree_gist.c +++ b/contrib/ltree/ltree_gist.c @@ -70,7 +70,7 @@ ltree_compress(PG_FUNCTION_ARGS) { /* ltree */ ltree_gist *key; ltree *val = (ltree *) DatumGetPointer(PG_DETOAST_DATUM(entry->key)); - int4 len = LTG_HDRSIZE + VARSIZE(val); + int32 len = LTG_HDRSIZE + VARSIZE(val); key = (ltree_gist *) palloc(len); SET_VARSIZE(key, len); @@ -118,7 +118,7 @@ ltree_same(PG_FUNCTION_ARGS) *result = (ISEQ(LTG_NODE(a), LTG_NODE(b))) ? true : false; else { - int4 i; + int32 i; BITVECP sa = LTG_SIGN(a), sb = LTG_SIGN(b); @@ -169,7 +169,7 @@ ltree_union(PG_FUNCTION_ARGS) GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); int *size = (int *) PG_GETARG_POINTER(1); BITVEC base; - int4 i, + int32 i, j; ltree_gist *result, *cur; @@ -253,7 +253,7 @@ ltree_penalty(PG_FUNCTION_ARGS) ltree_gist *origval = (ltree_gist *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(0))->key); ltree_gist *newval = (ltree_gist *) DatumGetPointer(((GISTENTRY *) PG_GETARG_POINTER(1))->key); float *penalty = (float *) PG_GETARG_POINTER(2); - int4 cmpr, + int32 cmpr, cmpl; cmpl = ltree_compare(LTG_GETLNODE(origval), LTG_GETLNODE(newval)); @@ -287,7 +287,7 @@ ltree_picksplit(PG_FUNCTION_ARGS) GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); GIST_SPLITVEC *v = (GIST_SPLITVEC *) PG_GETARG_POINTER(1); OffsetNumber j; - int4 i; + int32 i; RIX *array; OffsetNumber maxoff; int nbytes; @@ -441,7 +441,7 @@ ltree_picksplit(PG_FUNCTION_ARGS) static bool gist_isparent(ltree_gist *key, ltree *query) { - int4 numlevel = query->numlevel; + int32 numlevel = query->numlevel; int i; for (i = query->numlevel; i >= 0; i--) |