From 5f8f0ed5cd5d4b4f793c602ed09f9b4bdb98f7e8 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sat, 18 Nov 2017 20:38:15 -0800 Subject: altos/lisp: Add 'big' ints -- 24 bits wide With the default ints being only 14 bits, having a larger type with more precision seems useful. This is not exposed to the application. Signed-off-by: Keith Packard --- src/lisp/ao_lisp_string.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/lisp/ao_lisp_string.c') diff --git a/src/lisp/ao_lisp_string.c b/src/lisp/ao_lisp_string.c index 87f9289c..fff218df 100644 --- a/src/lisp/ao_lisp_string.c +++ b/src/lisp/ao_lisp_string.c @@ -83,9 +83,9 @@ ao_lisp_string_pack(struct ao_lisp_cons *cons) char *s = r; while (cons) { - if (ao_lisp_poly_type(cons->car) != AO_LISP_INT) + if (!ao_lisp_integer_typep(ao_lisp_poly_type(cons->car))) return ao_lisp_error(AO_LISP_INVALID, "non-int passed to pack"); - *s++ = ao_lisp_poly_int(cons->car); + *s++ = ao_lisp_poly_integer(cons->car); cons = ao_lisp_poly_cons(cons->cdr); } *s++ = 0; -- cgit v1.2.3