vec: vec_try_append
Essentially a method to attempt to append data but without doing any reallocation - stay within the bounds of the capacity.
This commit is contained in:
@@ -36,7 +36,10 @@ void vec_init(vec_t *, u64);
|
||||
void vec_free(vec_t *);
|
||||
u8 *vec_data(vec_t *);
|
||||
|
||||
// Append, possibly reallocating memory
|
||||
void vec_append(vec_t *, const void *const, u64);
|
||||
// Try to append without allocating memory
|
||||
bool vec_try_append(vec_t *, const void *const, u64);
|
||||
void vec_ensure_free(vec_t *, u64);
|
||||
void vec_clone(vec_t *, vec_t *);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user