diff options
Diffstat (limited to 'include/git2')
| -rw-r--r-- | include/git2/deprecated.h | 24 | ||||
| -rw-r--r-- | include/git2/strarray.h | 16 |
2 files changed, 30 insertions, 10 deletions
diff --git a/include/git2/deprecated.h b/include/git2/deprecated.h index e5e56edae..5f020b399 100644 --- a/include/git2/deprecated.h +++ b/include/git2/deprecated.h @@ -524,6 +524,30 @@ typedef int GIT_CALLBACK(git_headlist_cb)(git_remote_head *rhead, void *payload) /**@}*/ +/** @name Deprecated String Array Functions + * + * These types are retained for backward compatibility. The newer + * versions of these values should be preferred in all new code. + * + * There is no plan to remove these backward compatibility values at + * this time. + */ +/**@{*/ + +/** + * Free the memory referred to by the git_strarray. This is an alias of + * `git_strarray_dispose` and is preserved for backward compatibility. + * + * This function is deprecated, but there is no plan to remove this + * function at this time. + * + * @deprecated Use git_strarray_dispose + * @see git_strarray_dispose + */ +GIT_EXTERN(void) git_strarray_free(git_strarray *array); + +/**@}*/ + /** @name Deprecated Options Initialization Functions * * These functions are retained for backward compatibility. The newer diff --git a/include/git2/strarray.h b/include/git2/strarray.h index 86fa25f3f..0f657e6c5 100644 --- a/include/git2/strarray.h +++ b/include/git2/strarray.h @@ -25,20 +25,16 @@ typedef struct git_strarray { } git_strarray; /** - * Close a string array object - * - * This method should be called on `git_strarray` objects where the strings - * array is allocated and contains allocated strings, such as what you - * would get from `git_strarray_copy()`. Not doing so, will result in a - * memory leak. + * Free the strings contained in a string array. This method should + * be called on `git_strarray` objects that were provided by the + * library. Not doing so, will result in a memory leak. * * This does not free the `git_strarray` itself, since the library will - * never allocate that object directly itself (it is more commonly embedded - * inside another struct or created on the stack). + * never allocate that object directly itself. * - * @param array git_strarray from which to free string data + * @param array The git_strarray that contains strings to free */ -GIT_EXTERN(void) git_strarray_free(git_strarray *array); +GIT_EXTERN(void) git_strarray_dispose(git_strarray *array); /** * Copy a string array object from source to target. |
