func (odb *Odb) AddBackend(backend *OdbBackend, priority int) error { ecode := C.git_odb_add_backend(odb.git_odb, backend.git_odb_backend, C.int(priority)) if ecode != git_SUCCESS { return gitError() } return nil }
func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) { ret := C.git_odb_add_backend(v.ptr, backend.ptr, C.int(priority)) if ret < 0 { backend.Free() return MakeGitError(ret) } return nil }
func (v *Odb) AddBackend(backend *OdbBackend, priority int) (err error) { runtime.LockOSThread() defer runtime.UnlockOSThread() ret := C.git_odb_add_backend(v.ptr, backend.ptr, C.int(priority)) if ret < 0 { backend.Free() return MakeGitError(ret) } return nil }