From b8b2e3b2deeaab19715af063fc009b7c230b2336 Mon Sep 17 00:00:00 2001 From: Peter Eisentraut Date: Mon, 25 Jun 2012 01:51:46 +0300 Subject: 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. --- contrib/intarray/_int_gist.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'contrib/intarray/_int_gist.c') diff --git a/contrib/intarray/_int_gist.c b/contrib/intarray/_int_gist.c index 0123906be88..e429c8b58c9 100644 --- a/contrib/intarray/_int_gist.c +++ b/contrib/intarray/_int_gist.c @@ -106,7 +106,7 @@ g_int_union(PG_FUNCTION_ARGS) { GistEntryVector *entryvec = (GistEntryVector *) PG_GETARG_POINTER(0); int *size = (int *) PG_GETARG_POINTER(1); - int4 i, + int32 i, *ptr; ArrayType *res; int totlen = 0; @@ -128,7 +128,7 @@ g_int_union(PG_FUNCTION_ARGS) int nel; nel = ARRNELEMS(ent); - memcpy(ptr, ARRPTR(ent), nel * sizeof(int4)); + memcpy(ptr, ARRPTR(ent), nel * sizeof(int32)); ptr += nel; } @@ -317,8 +317,8 @@ g_int_same(PG_FUNCTION_ARGS) ArrayType *a = PG_GETARG_ARRAYTYPE_P(0); ArrayType *b = PG_GETARG_ARRAYTYPE_P(1); bool *result = (bool *) PG_GETARG_POINTER(2); - int4 n = ARRNELEMS(a); - int4 *da, + int32 n = ARRNELEMS(a); + int32 *da, *db; CHECKARRVALID(a); -- cgit v1.2.3