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_vector.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_vector.c')
| -rw-r--r-- | src/scheme/ao_scheme_vector.c | 8 | 
1 files changed, 4 insertions, 4 deletions
| diff --git a/src/scheme/ao_scheme_vector.c b/src/scheme/ao_scheme_vector.c index 419d6765..afdc89a8 100644 --- a/src/scheme/ao_scheme_vector.c +++ b/src/scheme/ao_scheme_vector.c @@ -145,9 +145,9 @@ ao_scheme_list_to_vector(struct ao_scheme_cons *cons)  	if (ao_scheme_exception)  		return NULL; -	ao_scheme_cons_stash(0, cons); +	ao_scheme_cons_stash(cons);  	vector = ao_scheme_vector_alloc(length, AO_SCHEME_NIL); -	cons = ao_scheme_cons_fetch(0); +	cons = ao_scheme_cons_fetch();  	if (!vector)  		return NULL;  	i = 0; @@ -166,9 +166,9 @@ ao_scheme_vector_to_list(struct ao_scheme_vector *vector)  	struct ao_scheme_cons	*cons = NULL;  	for (i = length; i-- > 0;) { -		ao_scheme_poly_stash(2, ao_scheme_vector_poly(vector)); +		ao_scheme_vector_stash(vector);  		cons = ao_scheme_cons_cons(vector->vals[i], ao_scheme_cons_poly(cons)); -		vector = ao_scheme_poly_vector(ao_scheme_poly_fetch(2)); +		vector = ao_scheme_vector_fetch();  		if (!cons)  			return NULL;  	} | 
