diff options
| author | Carlos Martín Nieto <[email protected]> | 2017-07-08 16:07:51 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2017-07-08 16:07:51 +0200 |
| commit | 55a1096141519a1f380d0702671cfe9bf90ec435 (patch) | |
| tree | 4a9c1357f3682d4134318e73ef85aa172cbfbd48 /stash.go | |
| parent | 7d29d6864474525c9853d86996d769a5459dc15d (diff) | |
Third round of keep-alive aditions
Diffstat (limited to 'stash.go')
| -rw-r--r-- | stash.go | 6 |
1 files changed, 5 insertions, 1 deletions
@@ -63,7 +63,7 @@ func (c *StashCollection) Save( ret := C.git_stash_save( oid.toC(), c.repo.ptr, stasherC, messageC, C.uint32_t(flags)) - + runtime.KeepAlive(c) if ret < 0 { return nil, MakeGitError(ret) } @@ -228,6 +228,7 @@ func (c *StashCollection) Apply(index int, opts StashApplyOptions) error { defer runtime.UnlockOSThread() ret := C.git_stash_apply(c.repo.ptr, C.size_t(index), optsC) + runtime.KeepAlive(c) if ret == C.GIT_EUSER { return progressData.Error } @@ -282,6 +283,7 @@ func (c *StashCollection) Foreach(callback StashCallback) error { defer runtime.UnlockOSThread() ret := C._go_git_stash_foreach(c.repo.ptr, handle) + runtime.KeepAlive(c) if ret == C.GIT_EUSER { return data.Error } @@ -303,6 +305,7 @@ func (c *StashCollection) Drop(index int) error { defer runtime.UnlockOSThread() ret := C.git_stash_drop(c.repo.ptr, C.size_t(index)) + runtime.KeepAlive(c) if ret < 0 { return MakeGitError(ret) } @@ -328,6 +331,7 @@ func (c *StashCollection) Pop(index int, opts StashApplyOptions) error { defer runtime.UnlockOSThread() ret := C.git_stash_pop(c.repo.ptr, C.size_t(index), optsC) + runtime.KeepAlive(c) if ret == C.GIT_EUSER { return progressData.Error } |
