diff options
author | Keith Packard <keithp@keithp.com> | 2016-11-05 17:53:15 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-02-20 11:16:50 -0800 |
commit | d8cf97fe22acefab40d7bb321138e46d4483fef7 (patch) | |
tree | 8dbab3f6977c62aa16208913013b3bd0d0728817 /src/lisp/ao_lisp_cons.c | |
parent | 286d07d83bd7ff361e5a904c151a75e5a9c8b071 (diff) |
altos/lisp: more GC issues. add patom
Use global ao_lisp_stack instead of local stack so that gc
moves of that item work.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/lisp/ao_lisp_cons.c')
-rw-r--r-- | src/lisp/ao_lisp_cons.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/lisp/ao_lisp_cons.c b/src/lisp/ao_lisp_cons.c index 4929b91c..7d3ca68d 100644 --- a/src/lisp/ao_lisp_cons.c +++ b/src/lisp/ao_lisp_cons.c @@ -83,3 +83,14 @@ ao_lisp_cons_print(ao_poly c) } printf(")"); } + +void +ao_lisp_cons_patom(ao_poly c) +{ + struct ao_lisp_cons *cons = ao_lisp_poly_cons(c); + + while (cons) { + ao_lisp_poly_patom(cons->car); + cons = ao_lisp_poly_cons(cons->cdr); + } +} |