2 * Copyright © 2016 Keith Packard <keithp@keithp.com>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
18 ao_lisp_poly_print(ao_lisp_poly p)
20 switch (ao_lisp_poly_type(p)) {
22 ao_lisp_cons_print(ao_lisp_poly_cons(p));
25 ao_lisp_string_print(ao_lisp_poly_string(p));
28 ao_lisp_int_print(ao_lisp_poly_int(p));
31 ao_lisp_atom_print(ao_lisp_poly_atom(p));
34 ao_lisp_builtin_print(ao_lisp_poly_builtin(p));
41 ao_lisp_poly_mark(ao_lisp_poly p)
43 switch (ao_lisp_poly_type(p)) {
45 ao_lisp_mark(&ao_lisp_cons_type, ao_lisp_poly_cons(p));
48 ao_lisp_mark(&ao_lisp_string_type, ao_lisp_poly_string(p));
51 ao_lisp_mark(&ao_lisp_atom_type, ao_lisp_poly_atom(p));
57 ao_lisp_poly_move(ao_lisp_poly p)
59 switch (ao_lisp_poly_type(p)) {
61 p = ao_lisp_cons_poly(ao_lisp_move(&ao_lisp_cons_type, ao_lisp_poly_cons(p)));
64 p = ao_lisp_string_poly(ao_lisp_move(&ao_lisp_string_type, ao_lisp_poly_string(p)));
67 p = ao_lisp_atom_poly(ao_lisp_move(&ao_lisp_atom_type, ao_lisp_poly_atom(p)));