project_files/frontlib/util/buffer.h
changeset 7234 613998625a3c
parent 7224 5143861c83bd
child 7271 5608ac657362
equal deleted inserted replaced
7230:240620f46dd7 7234:613998625a3c
    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);