diff options
author | Keith Packard <keithp@keithp.com> | 2017-12-19 12:39:20 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2017-12-19 12:39:20 -0800 |
commit | ed1f7b79abc7400a54b35fbf62c9db6855f9129a (patch) | |
tree | aad2b1c704d4f4a32eb54e46784858ca7cb0bf2f /src/scheme/ao_scheme_stack.c | |
parent | 71fb79492cb955af4bd52e79f1fa69d17e084dbc (diff) |
altos/scheme: Replace per-type indexed stash with poly stash heap
Instead of having a random set of stash arrays with explicit indices
used by callers, just have a general heap. Less error prone, and less code.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/scheme/ao_scheme_stack.c')
-rw-r--r-- | src/scheme/ao_scheme_stack.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/scheme/ao_scheme_stack.c b/src/scheme/ao_scheme_stack.c index e29e2b68..863df3ca 100644 --- a/src/scheme/ao_scheme_stack.c +++ b/src/scheme/ao_scheme_stack.c @@ -199,13 +199,13 @@ ao_scheme_stack_copy(struct ao_scheme_stack *old) struct ao_scheme_stack *n, *prev = NULL; while (old) { - ao_scheme_stack_stash(0, old); - ao_scheme_stack_stash(1, new); - ao_scheme_stack_stash(2, prev); + ao_scheme_stack_stash(old); + ao_scheme_stack_stash(new); + ao_scheme_stack_stash(prev); n = ao_scheme_stack_new(); - prev = ao_scheme_stack_fetch(2); - new = ao_scheme_stack_fetch(1); - old = ao_scheme_stack_fetch(0); + prev = ao_scheme_stack_fetch(); + new = ao_scheme_stack_fetch(); + old = ao_scheme_stack_fetch(); if (!n) return NULL; |