summaryrefslogtreecommitdiff
path: root/object.go
diff options
context:
space:
mode:
authorlhchavez <[email protected]>2019-01-08 02:01:44 +0000
committerlhchavez <[email protected]>2019-01-08 02:01:44 +0000
commitb609c04b681655f474b13798f6c74658295fa3a4 (patch)
tree5373c4bc84d15ea28226103c11fd293dcdec7396 /object.go
parentd7fd15b1e0fda55c7237609bbdc8caddff49d032 (diff)
parent2609f4c6f25a7da56e2e4960c250ea3dfb53e82b (diff)
Merge remote-tracking branch 'upstream/master' into mempack
Diffstat (limited to 'object.go')
-rw-r--r--object.go16
1 files changed, 8 insertions, 8 deletions
diff --git a/object.go b/object.go
index 5505e35..40ab2bf 100644
--- a/object.go
+++ b/object.go
@@ -13,12 +13,12 @@ import (
type ObjectType int
const (
- ObjectAny ObjectType = C.GIT_OBJ_ANY
- ObjectBad ObjectType = C.GIT_OBJ_BAD
- ObjectCommit ObjectType = C.GIT_OBJ_COMMIT
- ObjectTree ObjectType = C.GIT_OBJ_TREE
- ObjectBlob ObjectType = C.GIT_OBJ_BLOB
- ObjectTag ObjectType = C.GIT_OBJ_TAG
+ ObjectAny ObjectType = C.GIT_OBJECT_ANY
+ ObjectBad ObjectType = C.GIT_OBJECT_BAD
+ ObjectCommit ObjectType = C.GIT_OBJECT_COMMIT
+ ObjectTree ObjectType = C.GIT_OBJECT_TREE
+ ObjectBlob ObjectType = C.GIT_OBJECT_BLOB
+ ObjectTag ObjectType = C.GIT_OBJECT_TAG
)
type Object struct {
@@ -67,7 +67,7 @@ func (o *Object) ShortId() (string, error) {
if ecode < 0 {
return "", MakeGitError(ecode)
}
- defer C.git_buf_free(&resultBuf)
+ defer C.git_buf_dispose(&resultBuf)
return C.GoString(resultBuf.ptr), nil
}
@@ -217,7 +217,7 @@ func (o *Object) Peel(t ObjectType) (*Object, error) {
runtime.LockOSThread()
defer runtime.UnlockOSThread()
- err := C.git_object_peel(&cobj, o.ptr, C.git_otype(t))
+ err := C.git_object_peel(&cobj, o.ptr, C.git_object_t(t))
runtime.KeepAlive(o)
if err < 0 {
return nil, MakeGitError(err)