Commit 955f9ae9 by Vicent Marti

Export `git_strarray_free` instead of inlining

That way non-C bindings can use it.
parent 36b31329
......@@ -165,14 +165,7 @@ typedef struct {
size_t count;
} git_strarray;
GIT_INLINE(void) git_strarray_free(git_strarray *array)
{
size_t i;
for (i = 0; i < array->count; ++i)
free(array->strings[i]);
free(array->strings);
}
GIT_EXTERN(void) git_strarray_free(git_strarray *array);
/** @} */
GIT_END_DECL
......
......@@ -3,6 +3,15 @@
#include <stdarg.h>
#include <stdio.h>
void git_strarray_free(git_strarray *array)
{
size_t i;
for (i = 0; i < array->count; ++i)
free(array->strings[i]);
free(array->strings);
}
int git__fmt(char *buf, size_t buf_sz, const char *fmt, ...)
{
va_list va;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment