示例#1
0
文件: odb.go 项目: jgrocho/go-git2
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
}
示例#2
0
文件: odb.go 项目: joshi4/shortbread
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
}
示例#3
0
文件: odb.go 项目: wid/git2go
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
}