equal
deleted
inserted
replaced
28 * for e.g. conveniently returning it from a function. |
28 * for e.g. conveniently returning it from a function. |
29 * |
29 * |
30 * Convention: Size is zero iff data is a NULL pointer. |
30 * Convention: Size is zero iff data is a NULL pointer. |
31 */ |
31 */ |
32 typedef struct { |
32 typedef struct { |
33 void *data; |
33 void *data; |
34 size_t size; |
34 size_t size; |
35 } flib_buffer; |
35 } flib_buffer; |
36 |
36 |
37 /** |
37 /** |
38 * Just like flib_buffer, but the contents are not supposed to be modified. |
38 * Just like flib_buffer, but the contents are not supposed to be modified. |
39 */ |
39 */ |
40 typedef struct { |
40 typedef struct { |
41 const void *data; |
41 const void *data; |
42 size_t size; |
42 size_t size; |
43 } flib_constbuffer; |
43 } flib_constbuffer; |
44 |
44 |
45 /** |
45 /** |
46 * Simple variable-capacity data structure that can be efficiently appended to. |
46 * Simple variable-capacity data structure that can be efficiently appended to. |
47 */ |
47 */ |