From 56ffdfc61e37b9e7634c7c73b05d84355bea61cd Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Thu, 8 Feb 2018 11:14:30 +0000 Subject: buffer: deprecate `git_buf_free` in favor of `git_buf_dispose` --- include/git2/buffer.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'include/git2/buffer.h') diff --git a/include/git2/buffer.h b/include/git2/buffer.h index 9fc6a5805..41cd126b3 100644 --- a/include/git2/buffer.h +++ b/include/git2/buffer.h @@ -69,7 +69,19 @@ typedef struct { * * @param buffer The buffer to deallocate */ -GIT_EXTERN(void) git_buf_free(git_buf *buffer); +GIT_EXTERN(void) git_buf_dispose(git_buf *buffer); + +/** + * Alias of `git_buf_dispose`. + * + * This function is directly calls `git_buf_dispose` now and is deprecated. + * Going forward, we refer to functions freeing the internal state of a + * structure a `dispose` function, while functions freeing the structure + * themselves will be called a `free` function. + * + * This function is going to be removed in v0.30.0. + */ +GIT_EXTERN(void) GIT_DEPRECATED(git_buf_free)(git_buf *buffer); /** * Resize the buffer allocation to make more space. -- cgit v1.2.1