Go to the source code of this file.
◆ INPLACE_CAPACITY
◆ ITEM
| #define ITEM unsigned char |
◆ MAX_CAPACITY
◆ NAME
| #define NAME staticvec_chars |
◆ iter_example()
- Examples
- container/vector/static.c.
Definition at line 40 of file static.c.
40 {
41 staticvec_chars vec = staticvec_chars_new();
42
43
45 staticvec_chars_push(&vec, 'a' + i);
46 }
47
48
49 staticvec_chars_iter_const iter = staticvec_chars_get_iter_const(&vec);
50 unsigned char const*
item = NULL;
51 while (
item = staticvec_chars_iter_const_next(&iter),
item != NULL) {
53 }
54 printf("\n");
55
56 staticvec_chars_delete(&vec);
57}
◆ main()
◆ push_example()
- Examples
- container/vector/static.c.
Definition at line 17 of file static.c.
17 {
18 staticvec_chars vec = staticvec_chars_new();
19
20
22 staticvec_chars_push(&vec, i);
23 }
24
25
26 ASSERT(!staticvec_chars_try_push(&vec, 8));
27
28
30 ASSERT(*staticvec_chars_read(&vec, i) == i);
31 }
32
33
36
37 staticvec_chars_delete(&vec);
38}