Add some helpers for resizing dynamic arrays to allow them to both not grow if they're at capacity or shrink if significantly below capacity.

git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@3902 ed5197a5-7fde-0310-b194-c3ffbd925b24
This commit is contained in:
2022-06-17 21:18:10 +00:00
parent 4e3bf99327
commit e1ca715c64
4 changed files with 38 additions and 5 deletions

View File

@ -14,3 +14,5 @@ void* tf_malloc(size_t size);
void* tf_realloc(void* ptr, size_t size);
void tf_free(void* ptr);
char* tf_strdup(const char* string);
void* tf_resize_vec(void* ptr, size_t size);