mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
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.
This commit is contained in:
@ -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);
|
||||
|
Reference in New Issue
Block a user