diff options
Diffstat (limited to 'contrib/btree_gist')
-rw-r--r-- | contrib/btree_gist/btree_cash.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_date.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_float4.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_float8.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_inet.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_int2.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_int4.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_int8.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_interval.c | 6 | ||||
-rw-r--r-- | contrib/btree_gist/btree_macaddr.c | 4 | ||||
-rw-r--r-- | contrib/btree_gist/btree_oid.c | 14 | ||||
-rw-r--r-- | contrib/btree_gist/btree_time.c | 4 | ||||
-rw-r--r-- | contrib/btree_gist/btree_ts.c | 4 |
13 files changed, 72 insertions, 72 deletions
diff --git a/contrib/btree_gist/btree_cash.c b/contrib/btree_gist/btree_cash.c index f22e1bff929..8e8495ca068 100644 --- a/contrib/btree_gist/btree_cash.c +++ b/contrib/btree_gist/btree_cash.c @@ -35,34 +35,34 @@ Datum gbt_cash_same(PG_FUNCTION_ARGS); static bool gbt_cashgt(const void *a, const void *b) { - return (*((Cash *) a) > *((Cash *) b)); + return (*((const Cash *) a) > *((const Cash *) b)); } static bool gbt_cashge(const void *a, const void *b) { - return (*((Cash *) a) >= *((Cash *) b)); + return (*((const Cash *) a) >= *((const Cash *) b)); } static bool gbt_casheq(const void *a, const void *b) { - return (*((Cash *) a) == *((Cash *) b)); + return (*((const Cash *) a) == *((const Cash *) b)); } static bool gbt_cashle(const void *a, const void *b) { - return (*((Cash *) a) <= *((Cash *) b)); + return (*((const Cash *) a) <= *((const Cash *) b)); } static bool gbt_cashlt(const void *a, const void *b) { - return (*((Cash *) a) < *((Cash *) b)); + return (*((const Cash *) a) < *((const Cash *) b)); } static int gbt_cashkey_cmp(const void *a, const void *b) { - cashKEY *ia = (cashKEY *) (((Nsrt *) a)->t); - cashKEY *ib = (cashKEY *) (((Nsrt *) b)->t); + cashKEY *ia = (cashKEY *) (((const Nsrt *) a)->t); + cashKEY *ib = (cashKEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_date.c b/contrib/btree_gist/btree_date.c index d6b989a177b..1c0c3ec20c8 100644 --- a/contrib/btree_gist/btree_date.c +++ b/contrib/btree_gist/btree_date.c @@ -36,7 +36,7 @@ static bool gbt_dategt(const void *a, const void *b) { return DatumGetBool( - DirectFunctionCall2(date_gt, DateADTGetDatum(*((DateADT *) a)), DateADTGetDatum(*((DateADT *) b))) + DirectFunctionCall2(date_gt, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b))) ); } @@ -44,7 +44,7 @@ static bool gbt_datege(const void *a, const void *b) { return DatumGetBool( - DirectFunctionCall2(date_ge, DateADTGetDatum(*((DateADT *) a)), DateADTGetDatum(*((DateADT *) b))) + DirectFunctionCall2(date_ge, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b))) ); } @@ -52,7 +52,7 @@ static bool gbt_dateeq(const void *a, const void *b) { return DatumGetBool( - DirectFunctionCall2(date_eq, DateADTGetDatum(*((DateADT *) a)), DateADTGetDatum(*((DateADT *) b))) + DirectFunctionCall2(date_eq, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b))) ); } @@ -60,7 +60,7 @@ static bool gbt_datele(const void *a, const void *b) { return DatumGetBool( - DirectFunctionCall2(date_le, DateADTGetDatum(*((DateADT *) a)), DateADTGetDatum(*((DateADT *) b))) + DirectFunctionCall2(date_le, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b))) ); } @@ -68,7 +68,7 @@ static bool gbt_datelt(const void *a, const void *b) { return DatumGetBool( - DirectFunctionCall2(date_lt, DateADTGetDatum(*((DateADT *) a)), DateADTGetDatum(*((DateADT *) b))) + DirectFunctionCall2(date_lt, DateADTGetDatum(*((const DateADT *) a)), DateADTGetDatum(*((const DateADT *) b))) ); } @@ -77,8 +77,8 @@ gbt_datelt(const void *a, const void *b) static int gbt_datekey_cmp(const void *a, const void *b) { - dateKEY *ia = (dateKEY *) (((Nsrt *) a)->t); - dateKEY *ib = (dateKEY *) (((Nsrt *) b)->t); + dateKEY *ia = (dateKEY *) (((const Nsrt *) a)->t); + dateKEY *ib = (dateKEY *) (((const Nsrt *) b)->t); int res; res = DatumGetInt32(DirectFunctionCall2(date_cmp, DateADTGetDatum(ia->lower), DateADTGetDatum(ib->lower))); diff --git a/contrib/btree_gist/btree_float4.c b/contrib/btree_gist/btree_float4.c index e3f2155d593..cf1e45a381b 100644 --- a/contrib/btree_gist/btree_float4.c +++ b/contrib/btree_gist/btree_float4.c @@ -34,34 +34,34 @@ Datum gbt_float4_same(PG_FUNCTION_ARGS); static bool gbt_float4gt(const void *a, const void *b) { - return (*((float4 *) a) > *((float4 *) b)); + return (*((const float4 *) a) > *((const float4 *) b)); } static bool gbt_float4ge(const void *a, const void *b) { - return (*((float4 *) a) >= *((float4 *) b)); + return (*((const float4 *) a) >= *((const float4 *) b)); } static bool gbt_float4eq(const void *a, const void *b) { - return (*((float4 *) a) == *((float4 *) b)); + return (*((const float4 *) a) == *((const float4 *) b)); } static bool gbt_float4le(const void *a, const void *b) { - return (*((float4 *) a) <= *((float4 *) b)); + return (*((const float4 *) a) <= *((const float4 *) b)); } static bool gbt_float4lt(const void *a, const void *b) { - return (*((float4 *) a) < *((float4 *) b)); + return (*((const float4 *) a) < *((const float4 *) b)); } static int gbt_float4key_cmp(const void *a, const void *b) { - float4KEY *ia = (float4KEY *) (((Nsrt *) a)->t); - float4KEY *ib = (float4KEY *) (((Nsrt *) b)->t); + float4KEY *ia = (float4KEY *) (((const Nsrt *) a)->t); + float4KEY *ib = (float4KEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_float8.c b/contrib/btree_gist/btree_float8.c index 0fbebeea077..3ce87642cb9 100644 --- a/contrib/btree_gist/btree_float8.c +++ b/contrib/btree_gist/btree_float8.c @@ -35,34 +35,34 @@ Datum gbt_float8_same(PG_FUNCTION_ARGS); static bool gbt_float8gt(const void *a, const void *b) { - return (*((float8 *) a) > *((float8 *) b)); + return (*((const float8 *) a) > *((const float8 *) b)); } static bool gbt_float8ge(const void *a, const void *b) { - return (*((float8 *) a) >= *((float8 *) b)); + return (*((const float8 *) a) >= *((const float8 *) b)); } static bool gbt_float8eq(const void *a, const void *b) { - return (*((float8 *) a) == *((float8 *) b)); + return (*((const float8 *) a) == *((const float8 *) b)); } static bool gbt_float8le(const void *a, const void *b) { - return (*((float8 *) a) <= *((float8 *) b)); + return (*((const float8 *) a) <= *((const float8 *) b)); } static bool gbt_float8lt(const void *a, const void *b) { - return (*((float8 *) a) < *((float8 *) b)); + return (*((const float8 *) a) < *((const float8 *) b)); } static int gbt_float8key_cmp(const void *a, const void *b) { - float8KEY *ia = (float8KEY *) (((Nsrt *) a)->t); - float8KEY *ib = (float8KEY *) (((Nsrt *) b)->t); + float8KEY *ia = (float8KEY *) (((const Nsrt *) a)->t); + float8KEY *ib = (float8KEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_inet.c b/contrib/btree_gist/btree_inet.c index 439e6c90a7c..c136296ab53 100644 --- a/contrib/btree_gist/btree_inet.c +++ b/contrib/btree_gist/btree_inet.c @@ -36,34 +36,34 @@ Datum gbt_inet_same(PG_FUNCTION_ARGS); static bool gbt_inetgt(const void *a, const void *b) { - return (*((double *) a) > *((double *) b)); + return (*((const double *) a) > *((const double *) b)); } static bool gbt_inetge(const void *a, const void *b) { - return (*((double *) a) >= *((double *) b)); + return (*((const double *) a) >= *((const double *) b)); } static bool gbt_ineteq(const void *a, const void *b) { - return (*((double *) a) == *((double *) b)); + return (*((const double *) a) == *((const double *) b)); } static bool gbt_inetle(const void *a, const void *b) { - return (*((double *) a) <= *((double *) b)); + return (*((const double *) a) <= *((const double *) b)); } static bool gbt_inetlt(const void *a, const void *b) { - return (*((double *) a) < *((double *) b)); + return (*((const double *) a) < *((const double *) b)); } static int gbt_inetkey_cmp(const void *a, const void *b) { - inetKEY *ia = (inetKEY *) (((Nsrt *) a)->t); - inetKEY *ib = (inetKEY *) (((Nsrt *) b)->t); + inetKEY *ia = (inetKEY *) (((const Nsrt *) a)->t); + inetKEY *ib = (inetKEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_int2.c b/contrib/btree_gist/btree_int2.c index 3eb76b8be06..a40912b13d6 100644 --- a/contrib/btree_gist/btree_int2.c +++ b/contrib/btree_gist/btree_int2.c @@ -34,34 +34,34 @@ Datum gbt_int2_same(PG_FUNCTION_ARGS); static bool gbt_int2gt(const void *a, const void *b) { - return (*((int16 *) a) > *((int16 *) b)); + return (*((const int16 *) a) > *((const int16 *) b)); } static bool gbt_int2ge(const void *a, const void *b) { - return (*((int16 *) a) >= *((int16 *) b)); + return (*((const int16 *) a) >= *((const int16 *) b)); } static bool gbt_int2eq(const void *a, const void *b) { - return (*((int16 *) a) == *((int16 *) b)); + return (*((const int16 *) a) == *((const int16 *) b)); } static bool gbt_int2le(const void *a, const void *b) { - return (*((int16 *) a) <= *((int16 *) b)); + return (*((const int16 *) a) <= *((const int16 *) b)); } static bool gbt_int2lt(const void *a, const void *b) { - return (*((int16 *) a) < *((int16 *) b)); + return (*((const int16 *) a) < *((const int16 *) b)); } static int gbt_int2key_cmp(const void *a, const void *b) { - int16KEY *ia = (int16KEY *) (((Nsrt *) a)->t); - int16KEY *ib = (int16KEY *) (((Nsrt *) b)->t); + int16KEY *ia = (int16KEY *) (((const Nsrt *) a)->t); + int16KEY *ib = (int16KEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_int4.c b/contrib/btree_gist/btree_int4.c index 9e1362cc2f3..426f23f3fe0 100644 --- a/contrib/btree_gist/btree_int4.c +++ b/contrib/btree_gist/btree_int4.c @@ -35,34 +35,34 @@ Datum gbt_int4_same(PG_FUNCTION_ARGS); static bool gbt_int4gt(const void *a, const void *b) { - return (*((int32 *) a) > *((int32 *) b)); + return (*((const int32 *) a) > *((const int32 *) b)); } static bool gbt_int4ge(const void *a, const void *b) { - return (*((int32 *) a) >= *((int32 *) b)); + return (*((const int32 *) a) >= *((const int32 *) b)); } static bool gbt_int4eq(const void *a, const void *b) { - return (*((int32 *) a) == *((int32 *) b)); + return (*((const int32 *) a) == *((const int32 *) b)); } static bool gbt_int4le(const void *a, const void *b) { - return (*((int32 *) a) <= *((int32 *) b)); + return (*((const int32 *) a) <= *((const int32 *) b)); } static bool gbt_int4lt(const void *a, const void *b) { - return (*((int32 *) a) < *((int32 *) b)); + return (*((const int32 *) a) < *((const int32 *) b)); } static int gbt_int4key_cmp(const void *a, const void *b) { - int32KEY *ia = (int32KEY *) (((Nsrt *) a)->t); - int32KEY *ib = (int32KEY *) (((Nsrt *) b)->t); + int32KEY *ia = (int32KEY *) (((const Nsrt *) a)->t); + int32KEY *ib = (int32KEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_int8.c b/contrib/btree_gist/btree_int8.c index 45f5379a3e0..c05d8687fd3 100644 --- a/contrib/btree_gist/btree_int8.c +++ b/contrib/btree_gist/btree_int8.c @@ -35,34 +35,34 @@ Datum gbt_int8_same(PG_FUNCTION_ARGS); static bool gbt_int8gt(const void *a, const void *b) { - return (*((int64 *) a) > *((int64 *) b)); + return (*((const int64 *) a) > *((const int64 *) b)); } static bool gbt_int8ge(const void *a, const void *b) { - return (*((int64 *) a) >= *((int64 *) b)); + return (*((const int64 *) a) >= *((const int64 *) b)); } static bool gbt_int8eq(const void *a, const void *b) { - return (*((int64 *) a) == *((int64 *) b)); + return (*((const int64 *) a) == *((const int64 *) b)); } static bool gbt_int8le(const void *a, const void *b) { - return (*((int64 *) a) <= *((int64 *) b)); + return (*((const int64 *) a) <= *((const int64 *) b)); } static bool gbt_int8lt(const void *a, const void *b) { - return (*((int64 *) a) < *((int64 *) b)); + return (*((const int64 *) a) < *((const int64 *) b)); } static int gbt_int8key_cmp(const void *a, const void *b) { - int64KEY *ia = (int64KEY *) (((Nsrt *) a)->t); - int64KEY *ib = (int64KEY *) (((Nsrt *) b)->t); + int64KEY *ia = (int64KEY *) (((const Nsrt *) a)->t); + int64KEY *ib = (int64KEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_interval.c b/contrib/btree_gist/btree_interval.c index b56494684f7..bb779adf8e5 100644 --- a/contrib/btree_gist/btree_interval.c +++ b/contrib/btree_gist/btree_interval.c @@ -69,8 +69,8 @@ gbt_intvlt(const void *a, const void *b) static int gbt_intvkey_cmp(const void *a, const void *b) { - intvKEY *ia = (intvKEY *) (((Nsrt *) a)->t); - intvKEY *ib = (intvKEY *) (((Nsrt *) b)->t); + intvKEY *ia = (intvKEY *) (((const Nsrt *) a)->t); + intvKEY *ib = (intvKEY *) (((const Nsrt *) b)->t); int res; res = DatumGetInt32(DirectFunctionCall2(interval_cmp, IntervalPGetDatum(&ia->lower), IntervalPGetDatum(&ib->lower))); @@ -90,7 +90,7 @@ intr2num(const Interval *i) static float8 gbt_intv_dist(const void *a, const void *b) { - return (float8) Abs(intr2num((Interval *) a) - intr2num((Interval *) b)); + return (float8) Abs(intr2num((const Interval *) a) - intr2num((const Interval *) b)); } /* diff --git a/contrib/btree_gist/btree_macaddr.c b/contrib/btree_gist/btree_macaddr.c index 2a223361b8d..31125beda61 100644 --- a/contrib/btree_gist/btree_macaddr.c +++ b/contrib/btree_gist/btree_macaddr.c @@ -65,8 +65,8 @@ gbt_macadlt(const void *a, const void *b) static int gbt_macadkey_cmp(const void *a, const void *b) { - macKEY *ia = (macKEY *) (((Nsrt *) a)->t); - macKEY *ib = (macKEY *) (((Nsrt *) b)->t); + macKEY *ia = (macKEY *) (((const Nsrt *) a)->t); + macKEY *ib = (macKEY *) (((const Nsrt *) b)->t); int res; res = DatumGetInt32(DirectFunctionCall2(macaddr_cmp, MacaddrPGetDatum(&ia->lower), MacaddrPGetDatum(&ib->lower))); diff --git a/contrib/btree_gist/btree_oid.c b/contrib/btree_gist/btree_oid.c index 7b4de5726dc..e80a23c0b1a 100644 --- a/contrib/btree_gist/btree_oid.c +++ b/contrib/btree_gist/btree_oid.c @@ -35,34 +35,34 @@ Datum gbt_oid_same(PG_FUNCTION_ARGS); static bool gbt_oidgt(const void *a, const void *b) { - return (*((Oid *) a) > *((Oid *) b)); + return (*((const Oid *) a) > *((const Oid *) b)); } static bool gbt_oidge(const void *a, const void *b) { - return (*((Oid *) a) >= *((Oid *) b)); + return (*((const Oid *) a) >= *((const Oid *) b)); } static bool gbt_oideq(const void *a, const void *b) { - return (*((Oid *) a) == *((Oid *) b)); + return (*((const Oid *) a) == *((const Oid *) b)); } static bool gbt_oidle(const void *a, const void *b) { - return (*((Oid *) a) <= *((Oid *) b)); + return (*((const Oid *) a) <= *((const Oid *) b)); } static bool gbt_oidlt(const void *a, const void *b) { - return (*((Oid *) a) < *((Oid *) b)); + return (*((const Oid *) a) < *((const Oid *) b)); } static int gbt_oidkey_cmp(const void *a, const void *b) { - oidKEY *ia = (oidKEY *) (((Nsrt *) a)->t); - oidKEY *ib = (oidKEY *) (((Nsrt *) b)->t); + oidKEY *ia = (oidKEY *) (((const Nsrt *) a)->t); + oidKEY *ib = (oidKEY *) (((const Nsrt *) b)->t); if (ia->lower == ib->lower) { diff --git a/contrib/btree_gist/btree_time.c b/contrib/btree_gist/btree_time.c index c7f37d42302..a148e5e120b 100644 --- a/contrib/btree_gist/btree_time.c +++ b/contrib/btree_gist/btree_time.c @@ -105,8 +105,8 @@ gbt_timelt(const void *a, const void *b) static int gbt_timekey_cmp(const void *a, const void *b) { - timeKEY *ia = (timeKEY *) (((Nsrt *) a)->t); - timeKEY *ib = (timeKEY *) (((Nsrt *) b)->t); + timeKEY *ia = (timeKEY *) (((const Nsrt *) a)->t); + timeKEY *ib = (timeKEY *) (((const Nsrt *) b)->t); int res; res = DatumGetInt32(DirectFunctionCall2(time_cmp, TimeADTGetDatumFast(ia->lower), TimeADTGetDatumFast(ib->lower))); diff --git a/contrib/btree_gist/btree_ts.c b/contrib/btree_gist/btree_ts.c index 4badb80bd2f..05609232d25 100644 --- a/contrib/btree_gist/btree_ts.c +++ b/contrib/btree_gist/btree_ts.c @@ -106,8 +106,8 @@ gbt_tslt(const void *a, const void *b) static int gbt_tskey_cmp(const void *a, const void *b) { - tsKEY *ia = (tsKEY *) (((Nsrt *) a)->t); - tsKEY *ib = (tsKEY *) (((Nsrt *) b)->t); + tsKEY *ia = (tsKEY *) (((const Nsrt *) a)->t); + tsKEY *ib = (tsKEY *) (((const Nsrt *) b)->t); int res; res = DatumGetInt32(DirectFunctionCall2(timestamp_cmp, TimestampGetDatumFast(ia->lower), TimestampGetDatumFast(ib->lower))); |