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 42 of file static.c.
42 {
43 staticvec_chars vec = staticvec_chars_new();
44
45
47 staticvec_chars_push(&vec, 'a' + i);
48 }
49
50
51 staticvec_chars_iter_const iter = staticvec_chars_get_iter_const(&vec);
52 unsigned char const*
item = NULL;
53 while (
item = staticvec_chars_iter_const_next(&iter),
item != NULL) {
55 }
56 printf("\n");
57
59
60 staticvec_chars_delete(&vec);
61}
static dc_debug_fmt dc_debug_fmt_new()
◆ 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 DC_ASSERT(!staticvec_chars_try_push(&vec, 8));
27
28
30 DC_ASSERT(*staticvec_chars_read(&vec, i) == i);
31 }
32
33
36
38
39 staticvec_chars_delete(&vec);
40}
#define DC_ASSERT(expr,...)