From ed1f7b79abc7400a54b35fbf62c9db6855f9129a Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 19 Dec 2017 12:39:20 -0800 Subject: 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 --- src/scheme/ao_scheme_stack.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/scheme/ao_scheme_stack.c') 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; -- cgit v1.2.3