diff options
| author | Carlos Martín Nieto <[email protected]> | 2014-12-13 01:23:40 +0100 |
|---|---|---|
| committer | Carlos Martín Nieto <[email protected]> | 2014-12-13 01:23:40 +0100 |
| commit | 0202f152ac515aacf38b210df7d77ca82e146663 (patch) | |
| tree | f45361721d90522978cbd68272bdd8ba1e1c9f4e /push.go | |
| parent | 63116ea57e6920b25d7410eda2fc1c786be8a819 (diff) | |
Add the new callbacks for Remote.Push()
This unifies the types with the Push struct, in preparation for its
deletion.
Diffstat (limited to 'push.go')
| -rw-r--r-- | push.go | 11 |
1 files changed, 4 insertions, 7 deletions
@@ -146,17 +146,14 @@ type PushCallbacks struct { TransferProgress *PushTransferProgressCallback } -type PackbuilderProgressCallback func(stage int, current uint, total uint) int -type PushTransferProgressCallback func(current uint, total uint, bytes uint) int - //export packbuilderProgress func packbuilderProgress(stage C.int, current C.uint, total C.uint, data unsafe.Pointer) C.int { - return C.int((*(*PackbuilderProgressCallback)(data))(int(stage), uint(current), uint(total))) + return C.int((*(*PackbuilderProgressCallback)(data))(int32(stage), uint32(current), uint32(total))) } -//export pushTransferProgress -func pushTransferProgress(current C.uint, total C.uint, bytes C.size_t, data unsafe.Pointer) C.int { - return C.int((*(*PushTransferProgressCallback)(data))(uint(current), uint(total), uint(bytes))) +//export pushStructTransferProgress +func pushStructTransferProgress(current C.uint, total C.uint, bytes C.size_t, data unsafe.Pointer) C.int { + return C.int((*(*PushTransferProgressCallback)(data))(uint32(current), uint32(total), uint(bytes))) } func (p *Push) SetCallbacks(callbacks PushCallbacks) { |
