mirror of
https://git.postgresql.org/git/postgresql.git
synced 2025-01-24 18:55:04 +08:00
Remove useless use of bit-masking macros
In this case, the macros SET_8_BYTES(), GET_8_BYTES(), SET_4_BYTES(), GET_4_BYTES() are no-ops, so we can just remove them. The plan is to perhaps remove them from the source code altogether, so we'll start here. Discussion: https://www.postgresql.org/message-id/5d51721a-69ef-2053-9172-599b539f0628@2ndquadrant.com
This commit is contained in:
parent
649aeb123f
commit
d91da5eced
@ -354,12 +354,12 @@ typedef struct NumericSumAccum
|
||||
*/
|
||||
#define NUMERIC_ABBREV_BITS (SIZEOF_DATUM * BITS_PER_BYTE)
|
||||
#if SIZEOF_DATUM == 8
|
||||
#define NumericAbbrevGetDatum(X) ((Datum) SET_8_BYTES(X))
|
||||
#define DatumGetNumericAbbrev(X) ((int64) GET_8_BYTES(X))
|
||||
#define NumericAbbrevGetDatum(X) ((Datum) (X))
|
||||
#define DatumGetNumericAbbrev(X) ((int64) (X))
|
||||
#define NUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT64_MIN)
|
||||
#else
|
||||
#define NumericAbbrevGetDatum(X) ((Datum) SET_4_BYTES(X))
|
||||
#define DatumGetNumericAbbrev(X) ((int32) GET_4_BYTES(X))
|
||||
#define NumericAbbrevGetDatum(X) ((Datum) (X))
|
||||
#define DatumGetNumericAbbrev(X) ((int32) (X))
|
||||
#define NUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT32_MIN)
|
||||
#endif
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user