diff options
author | Edward Thomson <ethomson@edwardthomson.com> | 2020-05-29 13:13:19 +0100 |
---|---|---|
committer | Edward Thomson <ethomson@edwardthomson.com> | 2020-06-01 22:50:28 +0100 |
commit | 51eff5a58b95f91cbdd8e5caa750964c9f08e895 (patch) | |
tree | 64cebe7a2646eacd6c1fdd068a17213fef39c23b /examples | |
parent | a9746b306d32cc2d2bc5d446f6f7ae7c7068ba79 (diff) | |
download | libgit2-51eff5a58b95f91cbdd8e5caa750964c9f08e895.tar.gz |
strarray: we should `dispose` instead of `free`
We _dispose_ the contents of objects; we _free_ objects (and their
contents). Update `git_strarray_free` to be `git_strarray_dispose`.
`git_strarray_free` remains as a deprecated proxy function.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/checkout.c | 2 | ||||
-rw-r--r-- | examples/general.c | 2 | ||||
-rw-r--r-- | examples/remote.c | 4 | ||||
-rw-r--r-- | examples/tag.c | 2 |
4 files changed, 5 insertions, 5 deletions
diff --git a/examples/checkout.c b/examples/checkout.c index 897c42f3f..204b58d88 100644 --- a/examples/checkout.c +++ b/examples/checkout.c @@ -239,7 +239,7 @@ next: out: git_reference_free(remote_ref); - git_strarray_free(&remotes); + git_strarray_dispose(&remotes); return error; } diff --git a/examples/general.c b/examples/general.c index ddc53c3e8..1622ff8b0 100644 --- a/examples/general.c +++ b/examples/general.c @@ -707,7 +707,7 @@ static void reference_listing(git_repository *repo) git_reference_free(ref); } - git_strarray_free(&ref_list); + git_strarray_dispose(&ref_list); } /** diff --git a/examples/remote.c b/examples/remote.c index 34d886526..57f758c6c 100644 --- a/examples/remote.c +++ b/examples/remote.c @@ -129,7 +129,7 @@ static int cmd_rename(git_repository *repo, struct remote_opts *o) puts(problems.strings[0]); } - git_strarray_free(&problems); + git_strarray_dispose(&problems); return retval; } @@ -207,7 +207,7 @@ static int cmd_show(git_repository *repo, struct remote_opts *o) git_remote_free(remote); } - git_strarray_free(&remotes); + git_strarray_dispose(&remotes); return 0; } diff --git a/examples/tag.c b/examples/tag.c index 440829419..03d9c2bf9 100644 --- a/examples/tag.c +++ b/examples/tag.c @@ -162,7 +162,7 @@ static void action_list_tags(tag_state *state) each_tag(tag_names.strings[i], state); } - git_strarray_free(&tag_names); + git_strarray_dispose(&tag_names); } static void action_delete_tag(tag_state *state) |