summaryrefslogtreecommitdiffstats
path: root/itypes.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-04-21 21:19:39 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-04-21 21:19:39 -0700
commitb4d9e01b4c68a995d39f7c01c43ba2aed02c968b (patch)
tree97312474f566b5e08f352bf830a91f488290f26f /itypes.c
parent4e647f4d27827d2918e519cb3f52583d2bbb2a59 (diff)
downloadtxr-b4d9e01b4c68a995d39f7c01c43ba2aed02c968b.tar.gz
txr-b4d9e01b4c68a995d39f7c01c43ba2aed02c968b.tar.bz2
txr-b4d9e01b4c68a995d39f7c01c43ba2aed02c968b.zip
Rename c_uint_ptr_num; introduce cunum typedef.
Unsigned version of cnum becomes less verbose. * arith.c (c_uint_ptr_num): Renamed to c_unum. * arith.h (c_uint_ptr_num): Declaration removed. (c_unum): Declared. * itypes.c (c_u32, c_u64, c_uint): Follow rename. * lib.h (ucnum): New typedef. * rand.c (make_random_state): Follow rename.
Diffstat (limited to 'itypes.c')
-rw-r--r--itypes.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/itypes.c b/itypes.c
index 2d4c962f..e5e8697b 100644
--- a/itypes.c
+++ b/itypes.c
@@ -89,7 +89,7 @@ i32_t c_i32(val n, val self)
u32_t c_u32(val n, val self)
{
- uint_ptr_t v = c_uint_ptr_num(n);
+ uint_ptr_t v = c_unum(n);
if (v < 0 || v > 0xFFFFFFFF)
uw_throwf(error_s, lit("~a: value ~s is out of signed 32 bit range"),
self, n, nao);
@@ -110,7 +110,7 @@ i64_t c_i64(val n, val self)
u64_t c_u64(val n, val self)
{
- uint_ptr_t v = c_uint_ptr_num(n);
+ uint_ptr_t v = c_unum(n);
if (v < (cnum) -0x8000000000000000 || v > (cnum) 0x7FFFFFFFFFFFFFFF)
uw_throwf(error_s, lit("~a: value ~s is out of signed 64 bit range"),
self, n, nao);
@@ -181,7 +181,7 @@ int c_int(val n, val self)
unsigned int c_uint(val n, val self)
{
- uint_ptr_t v = c_uint_ptr_num(n);
+ uint_ptr_t v = c_unum(n);
if (v < 0 || v > UINT_MAX)
uw_throwf(error_s, lit("~a: value ~s is out of int range"),
self, n, nao);