Mark some symbols to be deprecated #minor (#698) #699

Merged
github-actions[bot] merged 3 commits from cherry-pick-402698831-release-1.0 into release-1.0 2020-12-05 13:43:02 -06:00
2 changed files with 5 additions and 5 deletions
Showing only changes of commit 5b5e281f1f - Show all commits

View File

@ -405,7 +405,7 @@ func (c *RemoteCollection) List() ([]string, error) {
if ecode < 0 { if ecode < 0 {
return nil, MakeGitError(ecode) return nil, MakeGitError(ecode)
} }
defer C.git_strarray_dispose(&r) defer C.git_strarray_free(&r)
remotes := makeStringsFromCStrings(r.strings, int(r.count)) remotes := makeStringsFromCStrings(r.strings, int(r.count))
return remotes, nil return remotes, nil
@ -639,7 +639,7 @@ func (o *Remote) FetchRefspecs() ([]string, error) {
if ret < 0 { if ret < 0 {
return nil, MakeGitError(ret) return nil, MakeGitError(ret)
} }
defer C.git_strarray_dispose(&crefspecs) defer C.git_strarray_free(&crefspecs)
refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count)) refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count))
return refspecs, nil return refspecs, nil
@ -672,7 +672,7 @@ func (o *Remote) PushRefspecs() ([]string, error) {
if ret < 0 { if ret < 0 {
return nil, MakeGitError(ret) return nil, MakeGitError(ret)
} }
defer C.git_strarray_dispose(&crefspecs) defer C.git_strarray_free(&crefspecs)
runtime.KeepAlive(o) runtime.KeepAlive(o)
refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count)) refspecs := makeStringsFromCStrings(crefspecs.strings, int(crefspecs.count))

4
tag.go
View File

@ -159,7 +159,7 @@ func (c *TagsCollection) List() ([]string, error) {
if ecode < 0 { if ecode < 0 {
return nil, MakeGitError(ecode) return nil, MakeGitError(ecode)
} }
defer C.git_strarray_dispose(&strC) defer C.git_strarray_free(&strC)
tags := makeStringsFromCStrings(strC.strings, int(strC.count)) tags := makeStringsFromCStrings(strC.strings, int(strC.count))
return tags, nil return tags, nil
@ -183,7 +183,7 @@ func (c *TagsCollection) ListWithMatch(pattern string) ([]string, error) {
if ecode < 0 { if ecode < 0 {
return nil, MakeGitError(ecode) return nil, MakeGitError(ecode)
} }
defer C.git_strarray_dispose(&strC) defer C.git_strarray_free(&strC)
tags := makeStringsFromCStrings(strC.strings, int(strC.count)) tags := makeStringsFromCStrings(strC.strings, int(strC.count))
return tags, nil return tags, nil