equal
deleted
inserted
replaced
39 * Free the memory of this vector |
39 * Free the memory of this vector |
40 */ |
40 */ |
41 void flib_vector_destroy(flib_vector *vec); |
41 void flib_vector_destroy(flib_vector *vec); |
42 |
42 |
43 /** |
43 /** |
|
44 * Resize the vector. This changes the size, and ensures the capacity is large enough to |
|
45 * for the new size. Can also free memory if the new size is smaller. There is no guarantee |
|
46 * about the contents of extra memory. |
|
47 */ |
|
48 int flib_vector_resize(flib_vector *vec, size_t newSize); |
|
49 |
|
50 /** |
44 * Append the provided data to the end of the vector, enlarging it as required. |
51 * Append the provided data to the end of the vector, enlarging it as required. |
45 * Returns the ammount of data appended, which is either len (success) or 0 (out of memory). |
52 * Returns the ammount of data appended, which is either len (success) or 0 (out of memory). |
46 * The vector remains unchanged if appending fails. |
53 * The vector remains unchanged if appending fails. |
47 */ |
54 */ |
48 int flib_vector_append(flib_vector *vec, const void *data, size_t len); |
55 int flib_vector_append(flib_vector *vec, const void *data, size_t len); |