diff options
| author | Carlos Martín Nieto <[email protected]> | 2017-07-08 11:38:19 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2017-07-08 11:38:19 +0200 |
| commit | 7d29d6864474525c9853d86996d769a5459dc15d (patch) | |
| tree | 330d588ef4b1b063724351b07d8e947a18c564b1 /graph.go | |
| parent | 58334cf60441bd713b8fd990e30e0580b97bf3ae (diff) | |
Second round of keep-alives
Diffstat (limited to 'graph.go')
| -rw-r--r-- | graph.go | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -13,6 +13,9 @@ func (repo *Repository) DescendantOf(commit, ancestor *Oid) (bool, error) { defer runtime.UnlockOSThread() ret := C.git_graph_descendant_of(repo.ptr, commit.toC(), ancestor.toC()) + runtime.KeepAlive(repo) + runtime.KeepAlive(commit) + runtime.KeepAlive(ancestor) if ret < 0 { return false, MakeGitError(ret) } @@ -28,6 +31,9 @@ func (repo *Repository) AheadBehind(local, upstream *Oid) (ahead, behind int, er var behindT C.size_t ret := C.git_graph_ahead_behind(&aheadT, &behindT, repo.ptr, local.toC(), upstream.toC()) + runtime.KeepAlive(repo) + runtime.KeepAlive(local) + runtime.KeepAlive(upstream) if ret < 0 { return 0, 0, MakeGitError(ret) } |
