From 77d1199f8a7d7a5be06d8dfa0b0394f803fd8525 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Tue, 27 Apr 2021 19:12:05 -0700 Subject: lib: move TAG_PAIR out of arith.c. The TAG_PAIR macro is going to be useful outside of the math module. * arith.c (TAG_PAIR): Macro removed. * lib.h (TAG_PAIR): Added here--oh look!--next to the very similar and related TYPE_PAIR. --- arith.c | 1 - lib.h | 1 + 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/arith.c b/arith.c index fc3f80ce..5e126f93 100644 --- a/arith.c +++ b/arith.c @@ -53,7 +53,6 @@ #define max(a, b) ((a) > (b) ? (a) : (b)) -#define TAG_PAIR(A, B) ((A) << TAG_SHIFT | (B)) #define CNUM_BIT ((int) sizeof (cnum) * CHAR_BIT) #define ABS(A) ((A) < 0 ? -(A) : (A)) diff --git a/lib.h b/lib.h index d95642b1..f1437e53 100644 --- a/lib.h +++ b/lib.h @@ -73,6 +73,7 @@ typedef enum type { #define TYPE_SHIFT 5 #define TYPE_PAIR(A, B) ((A) << TYPE_SHIFT | (B)) +#define TAG_PAIR(A, B) ((A) << TAG_SHIFT | (B)) typedef enum functype { -- cgit v1.2.3