X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Flisp%2Fao_lisp_save.c;h=c990e9c66c2271a90ced480c8b543a9bfa904b26;hb=cf5729a0bae51172f12fc9ec4339d4e975a45fcc;hp=e6e8b65e151ae28ba8bc211bc7ae4b4abb6ce668;hpb=c8f9db184cc929ebde845730a6d4b7864e423a84;p=fw%2Faltos diff --git a/src/lisp/ao_lisp_save.c b/src/lisp/ao_lisp_save.c index e6e8b65e..c990e9c6 100644 --- a/src/lisp/ao_lisp_save.c +++ b/src/lisp/ao_lisp_save.c @@ -15,13 +15,13 @@ #include ao_poly -ao_lisp_save(struct ao_lisp_cons *cons) +ao_lisp_do_save(struct ao_lisp_cons *cons) { if (!ao_lisp_check_argc(_ao_lisp_atom_save, cons, 0, 0)) return AO_LISP_NIL; #ifdef AO_LISP_SAVE - struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) &ao_lisp_pool[AO_LISP_POOL]; + struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) (void *) &ao_lisp_pool[AO_LISP_POOL]; ao_lisp_collect(AO_LISP_COLLECT_FULL); os->atoms = ao_lisp_atom_poly(ao_lisp_atoms); @@ -30,20 +30,20 @@ ao_lisp_save(struct ao_lisp_cons *cons) os->const_checksum_inv = (uint16_t) ~ao_lisp_const_checksum; if (ao_lisp_os_save()) - return _ao_lisp_atom_t; + return _ao_lisp_bool_true; #endif - return AO_LISP_NIL; + return _ao_lisp_bool_false; } ao_poly -ao_lisp_restore(struct ao_lisp_cons *cons) +ao_lisp_do_restore(struct ao_lisp_cons *cons) { if (!ao_lisp_check_argc(_ao_lisp_atom_save, cons, 0, 0)) return AO_LISP_NIL; #ifdef AO_LISP_SAVE struct ao_lisp_os_save save; - struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) &ao_lisp_pool[AO_LISP_POOL]; + struct ao_lisp_os_save *os = (struct ao_lisp_os_save *) (void *) &ao_lisp_pool[AO_LISP_POOL]; if (!ao_lisp_os_restore_save(&save, AO_LISP_POOL)) return ao_lisp_error(AO_LISP_INVALID, "header restore failed"); @@ -68,9 +68,10 @@ ao_lisp_restore(struct ao_lisp_cons *cons) /* Re-create the evaluator stack */ if (!ao_lisp_eval_restart()) - return AO_LISP_NIL; - return _ao_lisp_atom_t; + return _ao_lisp_bool_false; + + return _ao_lisp_bool_true; } #endif - return AO_LISP_NIL; + return _ao_lisp_bool_false; }