summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib.h b/lib.h
index 972f97d2..5d095108 100644
--- a/lib.h
+++ b/lib.h
@@ -508,6 +508,12 @@ INLINE cnum c_n(val num)
{
return coerce(cnum, num) >> TAG_SHIFT;
}
+
+INLINE ucnum c_u(val num)
+{
+ return convert(ucnum, coerce(cnum, num) >> TAG_SHIFT);
+}
+
#if SIZEOF_WCHAR_T < 4
#define lit_noex(strlit) coerce(obj_t *,\
coerce(cnum, L"\0" L ## strlit L"\0" + 1) | \