altos/scheme: Use AO_SCHEME_IS_CONS in cons memory funcs
[fw/altos] / src / scheme / ao_scheme_cons.c
index 02512e15f895ab36aa46a2dbf1ccb9aa56df4d7f..912100a934297137c37160f55a88d11284a16c08 100644 (file)
@@ -24,8 +24,8 @@ static void cons_mark(void *addr)
                ao_scheme_poly_mark(cons->car, 1);
                if (!cdr)
                        break;
-               if (ao_scheme_poly_type(cdr) != AO_SCHEME_CONS) {
-                       ao_scheme_poly_mark(cdr, 1);
+               if (!AO_SCHEME_IS_CONS(cdr)) {
+                       ao_scheme_poly_mark(cdr, 0);
                        break;
                }
                cons = ao_scheme_poly_cons(cdr);
@@ -58,7 +58,7 @@ static void cons_move(void *addr)
                cdr = cons->cdr;
                if (!cdr)
                        break;
-               if (ao_scheme_poly_base_type(cdr) != AO_SCHEME_CONS) {
+               if (!AO_SCHEME_IS_CONS(cdr)) {
                        (void) ao_scheme_poly_move(&cons->cdr, 0);
                        break;
                }