aboutsummaryrefslogtreecommitdiff
path: root/contrib/btree_gist/btree_int4.c
diff options
context:
space:
mode:
authorPeter Eisentraut <peter_e@gmx.net>2012-06-25 01:51:46 +0300
committerPeter Eisentraut <peter_e@gmx.net>2012-06-25 01:51:46 +0300
commitb8b2e3b2deeaab19715af063fc009b7c230b2336 (patch)
treec6ee1310487d59e37e3e143835b5609e78524f65 /contrib/btree_gist/btree_int4.c
parent7eb8c7851458eb88def80c290a4b5bc37cc321f3 (diff)
downloadpostgresql-b8b2e3b2deeaab19715af063fc009b7c230b2336.tar.gz
postgresql-b8b2e3b2deeaab19715af063fc009b7c230b2336.zip
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/btree_gist/btree_int4.c')
-rw-r--r--contrib/btree_gist/btree_int4.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c
index 426f23f3fe0..df2164fc5eb 100644
--- a/contrib/btree_gist/btree_int4.c
+++ b/contrib/btree_gist/btree_int4.c
@@ -78,7 +78,7 @@ gbt_int4key_cmp(const void *a, const void *b)
static float8
gbt_int4_dist(const void *a, const void *b)
{
- return GET_FLOAT_DISTANCE(int4, a, b);
+ return GET_FLOAT_DISTANCE(int32, a, b);
}
@@ -101,10 +101,10 @@ Datum int4_dist(PG_FUNCTION_ARGS);
Datum
int4_dist(PG_FUNCTION_ARGS)
{
- int4 a = PG_GETARG_INT32(0);
- int4 b = PG_GETARG_INT32(1);
- int4 r;
- int4 ra;
+ int32 a = PG_GETARG_INT32(0);
+ int32 b = PG_GETARG_INT32(1);
+ int32 r;
+ int32 ra;
r = a - b;
ra = Abs(r);