diff options
author | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-22 11:29:33 -0400 |
---|---|---|
committer | Joseph Hunkeler <jhunkeler@gmail.com> | 2024-03-22 22:20:28 -0400 |
commit | c2fb23b6b47186e47d983591e47ae4bc153ea4e3 (patch) | |
tree | 9d26b09794c5d86423150cc5663d3f371ac072cc /src | |
parent | f910931e73b4ae46c41e79756b44590e8c892c34 (diff) | |
download | stasis-c2fb23b6b47186e47d983591e47ae4bc153ea4e3.tar.gz |
Remove split_free() function
Diffstat (limited to 'src')
-rw-r--r-- | src/str.c | 13 |
1 files changed, 1 insertions, 12 deletions
@@ -172,7 +172,7 @@ void strdelsuffix(char *sptr, const char *suffix) { /** * Split a string by every delimiter in `delim` string. * - * Callee must free memory using `split_free()` + * Callee should free memory using `GENERIC_ARRAY_FREE()` * * @param sptr string to split * @param delim characters to split on @@ -242,17 +242,6 @@ char** split(char *_sptr, const char* delim, size_t max) } /** - * Frees memory allocated by `split()` - * @param ptr pointer to array - */ -void split_free(char **ptr) { - for (int i = 0; ptr[i] != NULL; i++) { - guard_free(ptr[i]); - } - guard_free(ptr); -} - -/** * Create new a string from an array of strings * * ~~~{.c} |