summaryrefslogtreecommitdiff
path: root/odb.go
diff options
context:
space:
mode:
Diffstat (limited to 'odb.go')
-rw-r--r--odb.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/odb.go b/odb.go
index 6d18ce9..953791c 100644
--- a/odb.go
+++ b/odb.go
@@ -83,12 +83,12 @@ func (v *Odb) ForEach() chan *Oid {
func (v *Odb) Hash(data []byte, otype ObjectType) (oid *Oid, err error) {
oid = new(Oid)
header := (*reflect.SliceHeader)(unsafe.Pointer(&data))
- ptr := (*C.char)(unsafe.Pointer(header.Data))
+ ptr := unsafe.Pointer(header.Data)
runtime.LockOSThread()
defer runtime.UnlockOSThread()
- ret := C.git_odb_hash(oid.toC(), unsafe.Pointer(ptr), C.size_t(header.Len), C.git_otype(otype));
+ ret := C.git_odb_hash(oid.toC(), ptr, C.size_t(header.Len), C.git_otype(otype));
if ret < 0 {
err = LastError()
}