X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Flisp%2Fao_lisp_builtin.c;h=6cbcb92cb401624cb3f2653da3da0f1f7a763534;hb=9126ae10b3c5acf0055caa31b1f08215675af784;hp=ebc69f7759ec0d348f427c2480b3682170173061;hpb=dba374516ed396633659dec571b6a44b03da8ad1;p=fw%2Faltos diff --git a/src/lisp/ao_lisp_builtin.c b/src/lisp/ao_lisp_builtin.c index ebc69f77..6cbcb92c 100644 --- a/src/lisp/ao_lisp_builtin.c +++ b/src/lisp/ao_lisp_builtin.c @@ -41,9 +41,11 @@ const struct ao_lisp_type ao_lisp_builtin_type = { #ifdef AO_LISP_MAKE_CONST char *ao_lisp_builtin_name(enum ao_lisp_builtin_id b) { + (void) b; return "???"; } char *ao_lisp_args_name(uint8_t args) { + (void) args; return "???"; } #else @@ -104,6 +106,7 @@ static const ao_poly ao_lisp_args_atoms[] = { char * ao_lisp_args_name(uint8_t args) { + args &= AO_LISP_FUNC_MASK; if (args < sizeof ao_lisp_args_atoms / sizeof ao_lisp_args_atoms[0]) return ao_lisp_poly_atom(ao_lisp_args_atoms[args])->name; return "(unknown)"; @@ -210,9 +213,9 @@ ao_lisp_last(struct ao_lisp_cons *cons) ao_poly ao_lisp_length(struct ao_lisp_cons *cons) { - if (!ao_lisp_check_argc(_ao_lisp_atom_last, cons, 1, 1)) + if (!ao_lisp_check_argc(_ao_lisp_atom_length, cons, 1, 1)) return AO_LISP_NIL; - if (!ao_lisp_check_argt(_ao_lisp_atom_last, cons, 0, AO_LISP_CONS, 1)) + if (!ao_lisp_check_argt(_ao_lisp_atom_length, cons, 0, AO_LISP_CONS, 1)) return AO_LISP_NIL; return ao_lisp_int_poly(ao_lisp_cons_length(ao_lisp_poly_cons(ao_lisp_arg(cons, 0)))); }