diff options
author | Keith Packard <keithp@keithp.com> | 2017-11-18 20:38:15 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-11-18 20:49:52 -0800 |
commit | 5f8f0ed5cd5d4b4f793c602ed09f9b4bdb98f7e8 (patch) | |
tree | de2468ca80a3411735517ee39155d1cf30055ceb /src/lisp/ao_lisp_string.c | |
parent | e745229311366a792110d78d8480a2bf83eef9a0 (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_string.c')
-rw-r--r-- | src/lisp/ao_lisp_string.c | 4 |
1 files changed, 2 insertions, 2 deletions
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; |