altos/lisp: Change lisp objects to use ao_poly everywhere. Add const
[fw/altos] / src / lisp / ao_lisp_poly.c
1 /*
2  * Copyright © 2016 Keith Packard <keithp@keithp.com>
3  *
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.
8  *
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.
13  */
14
15 #include "ao_lisp.h"
16
17 /*
18
19 static const struct ao_lisp_builtin builtin_plus = {
20         .type = AO_LISP_BUILTIN,
21         .func = ao_lisp_plus,
22         .name = "+"
23 };
24
25 static const struct ao_lisp_atom atom_plus = {
26         .type = AO_LISP_ATOM,
27         .val = AO_LISP_OTHER_POLY(&builtin_plus),
28         .next = AO_LISP_ATOM_CONST,
29         .name = "plus"
30 };
31
32 static const struct ao_lisp_builtin builtin_minus = {
33         .type = AO_LISP_BUILTIN,
34         .func = ao_lisp_minus
35 };
36
37 static const struct ao_lisp_builtin builtin_times = {
38         .type = AO_LISP_BUILTIN,
39         .func = ao_lisp_times
40 };
41
42
43 const struct ao_lisp_atom const *ao_lisp_builtins[] = {
44         &atom_plus,
45         0
46 };
47 */