diff options
author | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-30 15:29:31 +0200 |
---|---|---|
committer | Máximo Cuadros <mcuadros@gmail.com> | 2016-08-30 15:29:31 +0200 |
commit | 60636dd029a1e356bab8698b798504302fe645cb (patch) | |
tree | 49cfa335c09bb727d1954132075960562951a2aa /cshared | |
parent | 2c527d02ceac3879f82ab53645b6c7c03c0e5d71 (diff) | |
download | go-git-60636dd029a1e356bab8698b798504302fe645cb.tar.gz |
DiffTree based on TreeWalker
Diffstat (limited to 'cshared')
-rw-r--r-- | cshared/tree_cshared.go | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/cshared/tree_cshared.go b/cshared/tree_cshared.go index 3884817..ddaf0f1 100644 --- a/cshared/tree_cshared.go +++ b/cshared/tree_cshared.go @@ -106,20 +106,18 @@ func c_NewTreeWalker(r uint64, t uint64) uint64 { } //export c_TreeWalker_Next -func c_TreeWalker_Next(tw uint64) (*C.char, *C.char, uint32, *C.char, - uint64, int, *C.char) { +func c_TreeWalker_Next(tw uint64) (*C.char, *C.char, uint32, *C.char, int, *C.char) { obj, ok := GetObject(Handle(tw)) if !ok { - return nil, nil, 0, nil, IH, ErrorCodeNotFound, C.CString(MessageNotFound) + return nil, nil, 0, nil, ErrorCodeNotFound, C.CString(MessageNotFound) } walker := obj.(*git.TreeWalker) - name, entry, object, err := walker.Next() + name, entry, err := walker.Next() if err != nil { - return nil, nil, 0, nil, IH, ErrorCodeInternal, C.CString(err.Error()) + return nil, nil, 0, nil, ErrorCodeInternal, C.CString(err.Error()) } return C.CString(name), C.CString(entry.Name), uint32(entry.Mode), - CBytes(entry.Hash[:]), uint64(RegisterObject(&object)), - ErrorCodeSuccess, nil + CBytes(entry.Hash[:]), ErrorCodeSuccess, nil } //export c_TreeWalker_Tree @@ -140,4 +138,4 @@ func c_TreeWalker_Close(tw uint64) { } walker := obj.(*git.TreeWalker) walker.Close() -}
\ No newline at end of file +} |