diff options
author | Tucker Evans <tucker@tuckerevans.com> | 2020-07-03 00:49:35 -0400 |
---|---|---|
committer | Tucker Evans <tucker@tuckerevans.com> | 2020-07-04 22:57:47 -0400 |
commit | 40daf4d7bb71ab3af2b6da71b5868bc7760a6593 (patch) | |
tree | 527dbcb1d8c33d5e23cd0cbf4c1d515b94ba067f | |
parent | 4832ab4b43a2e9fb72b1814b32421de1dba1edcb (diff) |
Fix remove "_back" from pop/push calls in vector doc
These were left in some examples after copying from double ended queue
documentation.
-rw-r--r-- | collections/vector/vector.adoc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/collections/vector/vector.adoc b/collections/vector/vector.adoc index f1e29e2..3fe2dbf 100644 --- a/collections/vector/vector.adoc +++ b/collections/vector/vector.adoc @@ -1,7 +1,7 @@ Vector ====== Tucker Evans -v0.8, 2020-07-03 +v0.8.1, 2020-07-03 A basic vector, that hold pointers to your data structures. @@ -61,7 +61,7 @@ Examples vec *vector = vec_new(); assert(vec_size(vector) == 0); -vec_push_back(vector, NULL); +vec_push(vector, NULL); assert(vec_size(vector) == 1); ---- @@ -96,12 +96,12 @@ char *str1 = "ONE"; char *str2 = "TWO"; vec *vector = vec_with_capacity(16); -vec_push_back(vector, str_dup(str1)); -vec_push_back(vector, str_dup(str2)); +vec_push(vector, str_dup(str1)); +vec_push(vector, str_dup(str2)); vec *new = vec_cp(vector); -assert(strcmp(vec_pop_back, str2) == 0); -assert(strcmp(vec_pop_back, str1) == 0); +assert(strcmp(vec_pop, str2) == 0); +assert(strcmp(vec_pop, str1) == 0); ---- [[vec_print]] @@ -229,8 +229,8 @@ char *str1 = "ONE"; char *str2 = "TWO"; vec *vector = vec_new(); -vec_push_back(vector, str_dup(str1)); -vec_push_back(vector, str_dup(str2)); +vec_push(vector, str_dup(str1)); +vec_push(vector, str_dup(str2)); vec_clear(vector); assert(vec_size(vector) == 0); |