summaryrefslogtreecommitdiff
path: root/commit.go
diff options
context:
space:
mode:
Diffstat (limited to 'commit.go')
-rw-r--r--commit.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/commit.go b/commit.go
index 52f7c01..6830da3 100644
--- a/commit.go
+++ b/commit.go
@@ -14,7 +14,7 @@ import (
// Commit
type Commit struct {
- gitObject
+ Object
cast_ptr *C.git_commit
}
@@ -37,7 +37,7 @@ func (c Commit) Tree() (*Tree, error) {
return nil, MakeGitError(err)
}
- return allocObject((*C.git_object)(ptr), c.repo).(*Tree), nil
+ return allocTree(ptr, c.repo), nil
}
func (c Commit) TreeId() *Oid {
@@ -61,7 +61,7 @@ func (c *Commit) Parent(n uint) *Commit {
return nil
}
- return allocObject((*C.git_object)(cobj), c.repo).(*Commit)
+ return allocCommit(cobj, c.repo)
}
func (c *Commit) ParentId(n uint) *Oid {