diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 19:54:32 -0500 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-02-17 19:54:32 -0500 |
| commit | 30c5b1ec254bb5cc158fe82bf58821d7d35e98b2 (patch) | |
| tree | 1189dc1e68f6f95f01d8672240da246c6a7cc775 | |
| parent | dd2de3166653c1bf0d33d5872791ae6fbe8e2998 (diff) | |
Use #defines for Int aliasing
| -rw-r--r-- | builtins/integers.c | 1 | ||||
| -rw-r--r-- | 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 |
