summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-09-12 23:10:32 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-09-12 23:10:32 -0700
commit10680dee1019909374df8990afba41eff8371238 (patch)
treeb46cec4ca461a68cf7eba7913aec404d7a844d42 /lib.c
parentb98e4e9827077e5e74184127324d0b73e0c0a373 (diff)
downloadtxr-10680dee1019909374df8990afba41eff8371238.tar.gz
txr-10680dee1019909374df8990afba41eff8371238.tar.bz2
txr-10680dee1019909374df8990afba41eff8371238.zip
Reduce proliferation of TAG_SHIFT.
* arith.c (num_to_buffer, c_unum, c_dbl_num, c_dbl_unum, c_num, c_fixnum): Use c_n inline function instead of open coding exactly the same thing. * lib.c (c_chr): Likewise. * struct.c (make_struct_type, lookup_slot, lookup_static_slot_desc, static_slot_p): Likewise.
Diffstat (limited to 'lib.c')
-rw-r--r--lib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib.c b/lib.c
index 9e220f10..464cab79 100644
--- a/lib.c
+++ b/lib.c
@@ -6654,7 +6654,7 @@ wchar_t c_chr(val chr)
{
if (!is_chr(chr))
type_mismatch(lit("~s is not a character"), chr, nao);
- return convert(wchar_t, coerce(cnum, chr) >> TAG_SHIFT);
+ return convert(wchar_t, c_n(chr));
}
val chr_isalnum(val ch)