Merge pull request #328 from navytux/y/odb-type

odb: Expose git_odb_object_type() as OdbObject.Type()
This commit is contained in:
Carlos Martín Nieto 2016-07-24 18:09:12 +02:00 committed by GitHub
commit 3ed398a78e
1 changed files with 4 additions and 0 deletions

4
odb.go
View File

@ -226,6 +226,10 @@ func (object *OdbObject) Len() (len uint64) {
return uint64(C.git_odb_object_size(object.ptr))
}
func (object *OdbObject) Type() ObjectType {
return ObjectType(C.git_odb_object_type(object.ptr))
}
func (object *OdbObject) Data() (data []byte) {
var c_blob unsafe.Pointer = C.git_odb_object_data(object.ptr)
var blob []byte