Skip to content

Commit

Permalink
[cgo] refs fibercrypto#116 To detect automatic GoSlice
Browse files Browse the repository at this point in the history
  • Loading branch information
Maykel Arias Torres committed Feb 7, 2020
1 parent 71dc78d commit acb4e4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion lib/cgo/coin.block.go
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ func SKY_coin_CreateUnspents(_bh *C.coin__BlockHeader, _txn *C.Transaction__Hand
}
txn := *__txn
__arg2 := coin.CreateUnspents(bh, txn)
copyTocoin_UxArray(reflect.ValueOf(__arg2), _arg2)
copyTocoin__UxArray(reflect.ValueOf(__arg2), _arg2)
return
}

Expand Down
8 changes: 4 additions & 4 deletions lib/cgo/coin.outputs.go
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ func SKY_coin_AddressUxOuts_Flatten(_auo *C.AddressUxOuts__Handle, _arg0 *C.coin
}
auo := *__auo
__arg0 := auo.Flatten()
copyTocoin_UxArray(reflect.ValueOf(__arg0), _arg0)
copyTocoin__UxArray(reflect.ValueOf(__arg0), _arg0)
return
}

Expand Down Expand Up @@ -213,7 +213,7 @@ func SKY_coin_UxArray_Sub(_ua *C.coin__UxArray, _other *C.coin__UxArray, _arg1 *
ua := *(*coin.UxArray)(unsafe.Pointer(_ua))
other := *(*coin.UxArray)(unsafe.Pointer(_other))
__arg1 := ua.Sub(other)
copyTocoin_UxArray(reflect.ValueOf(__arg1), _arg1)
copyTocoin__UxArray(reflect.ValueOf(__arg1), _arg1)
return
}

Expand All @@ -222,7 +222,7 @@ func SKY_coin_UxArray_Add(_ua *C.coin__UxArray, _other *C.coin__UxArray, _arg1 *
ua := *(*coin.UxArray)(unsafe.Pointer(_ua))
other := *(*coin.UxArray)(unsafe.Pointer(_other))
__arg1 := ua.Add(other)
copyTocoin_UxArray(reflect.ValueOf(__arg1), _arg1)
copyTocoin__UxArray(reflect.ValueOf(__arg1), _arg1)
return
}

Expand All @@ -235,7 +235,7 @@ func SKY_coin_AddressUxOuts_Get(handle C.AddressUxOuts__Handle, _key *C.cipher__
key := *(*cipher.Address)(unsafe.Pointer(_key))
uxOuts, found := (*a)[key]
if found {
copyTocoin_UxArray(reflect.ValueOf(uxOuts), _uxOuts)
copyTocoin__UxArray(reflect.ValueOf(uxOuts), _uxOuts)
____error_code = SKY_OK
}
} else {
Expand Down
2 changes: 1 addition & 1 deletion lib/cgo/libsky_mem.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ func copyToStringMap(gomap map[string]string, dest *C.GoStringMap_) {
*dest = (C.GoStringMap_)(registerHandle(gomap))
}

func copyTocoin_UxArray(src reflect.Value, dest *C.coin__UxArray) {
func copyTocoin__UxArray(src reflect.Value, dest *C.coin__UxArray) {
srcLen := src.Len()
if srcLen == 0 {
dest.len = 0
Expand Down

0 comments on commit acb4e4d

Please sign in to comment.