summaryrefslogtreecommitdiffstats
path: root/lib.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2011-12-14 17:14:29 -0800
committerKaz Kylheku <kaz@kylheku.com>2011-12-14 17:14:29 -0800
commit93e4c50d09dcc20d7b244b66987f869143d45dd0 (patch)
tree83a176f4793df2dbfcf195b0649290cf8b3986c2 /lib.h
parent311294aef85c349ee71c3925a52d0888073a1fa0 (diff)
downloadtxr-93e4c50d09dcc20d7b244b66987f869143d45dd0.tar.gz
txr-93e4c50d09dcc20d7b244b66987f869143d45dd0.tar.bz2
txr-93e4c50d09dcc20d7b244b66987f869143d45dd0.zip
* eval.c (eval_init): Removed registration for vec_get_fil.
Renamed vec_set_fill to vec-set-length. * hash.c (equal_hash): vec_fill to vec_length name change. (hash_grow, make_hash): No need to call vec_set_length. * lib.c (equal, vecref, vec_push, length_vec, list_vector, obj_print, obj_pprint): vec_fill to vec_length name change. (vector): Argument now represents actual length, not just allocated size. (vec_get_fill): Function removed; did exactly the same thing as length_vec. (vec_set_fill): Function renamed to vec_set_length. (vector_list): Allocate a 0 length vector initially. * lib.h (enum vecindex): member changes name from vec_fill to vec_length. (vector): Parameter name changed. (vec_set_fill): Redeclared. (vec_get_fill): Declaration removed. * txr.1: Doc stubs updated.
Diffstat (limited to 'lib.h')
-rw-r--r--lib.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib.h b/lib.h
index c4a0f72a..30fd35c1 100644
--- a/lib.h
+++ b/lib.h
@@ -118,7 +118,7 @@ struct func {
} f;
};
-enum vecindex { vec_alloc = -2, vec_fill = -1 };
+enum vecindex { vec_alloc = -2, vec_length = -1 };
struct vec {
type_t type;
@@ -491,9 +491,8 @@ val chain(val first_fun, ...);
val andf(val first_fun, ...);
val orf(val first_fun, ...);
val swap_12_21(val fun);
-val vector(val alloc);
-val vec_get_fill(val vec);
-val vec_set_fill(val vec, val fill);
+val vector(val length);
+val vec_set_length(val vec, val fill);
val vecref(val vec, val ind);
val *vecref_l(val vec, val ind);
val vec_push(val vec, val item);