Skip to content

Commit d91da5e

Browse files
committed
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/[email protected]
1 parent 649aeb1 commit d91da5e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/backend/utils/adt/numeric.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -354,12 +354,12 @@ typedef struct NumericSumAccum
354354
*/
355355
#define NUMERIC_ABBREV_BITS (SIZEOF_DATUM * BITS_PER_BYTE)
356356
#if SIZEOF_DATUM == 8
357-
#define NumericAbbrevGetDatum(X) ((Datum) SET_8_BYTES(X))
358-
#define DatumGetNumericAbbrev(X) ((int64) GET_8_BYTES(X))
357+
#define NumericAbbrevGetDatum(X) ((Datum) (X))
358+
#define DatumGetNumericAbbrev(X) ((int64) (X))
359359
#define NUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT64_MIN)
360360
#else
361-
#define NumericAbbrevGetDatum(X) ((Datum) SET_4_BYTES(X))
362-
#define DatumGetNumericAbbrev(X) ((int32) GET_4_BYTES(X))
361+
#define NumericAbbrevGetDatum(X) ((Datum) (X))
362+
#define DatumGetNumericAbbrev(X) ((int32) (X))
363363
#define NUMERIC_ABBREV_NAN NumericAbbrevGetDatum(PG_INT32_MIN)
364364
#endif
365365

0 commit comments

Comments
 (0)