From 30c5b1ec254bb5cc158fe82bf58821d7d35e98b2 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sat, 17 Feb 2024 19:54:32 -0500 Subject: Use #defines for Int aliasing --- builtins/integers.c | 1 - builtins/integers.h | 10 +++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/builtins/integers.c b/builtins/integers.c index b4170f7b..13dbe31c 100644 --- a/builtins/integers.c +++ b/builtins/integers.c @@ -63,7 +63,6 @@ .random=KindOfInt##__random, \ }; -DEFINE_INT_TYPE(int64_t, Int, "ld", labs, INT64_MIN, INT64_MAX); DEFINE_INT_TYPE(int64_t, Int64, "ld", labs, INT64_MIN, INT64_MAX); DEFINE_INT_TYPE(int32_t, Int32, "d_i32", abs, INT32_MIN, INT32_MAX); DEFINE_INT_TYPE(int16_t, Int16, "d_i16", abs, INT16_MIN, INT16_MAX); diff --git a/builtins/integers.h b/builtins/integers.h index 5eec40a8..944d3f3d 100644 --- a/builtins/integers.h +++ b/builtins/integers.h @@ -23,11 +23,19 @@ } type_name##_namespace_t; \ extern type_name##_namespace_t type_name##_type; -DEFINE_INT_TYPE(int64_t, Int); DEFINE_INT_TYPE(int64_t, Int64); DEFINE_INT_TYPE(int32_t, Int32); DEFINE_INT_TYPE(int16_t, Int16); DEFINE_INT_TYPE(int8_t, Int8); #undef DEFINE_INT_TYPE +#define Int__as_str Int64__as_str +#define Int__compare Int64__compare +#define Int__format Int64__format +#define Int__hex Int64__hex +#define Int__octal Int64__octal +#define Int__random Int64__random +#define Int_namespace_t Int64_namespace_t +#define Int_type Int64_type + // vim: ts=4 sw=0 et cino=L2,l1,(0,W4,m1,\:0 -- cgit v1.2.3