From 364f127d44ff57ffbeb60a2071f8d10c385f83ea Mon Sep 17 00:00:00 2001 From: Maykel Arias Torres Date: Wed, 25 Sep 2019 00:07:05 -0400 Subject: [PATCH] [cgo][libc] refs #105 Correcting `coin.block ` memory in pyskycoin --- lib/cgo/coin.block.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/cgo/coin.block.go b/lib/cgo/coin.block.go index 992d0b6eb..933034eb5 100644 --- a/lib/cgo/coin.block.go +++ b/lib/cgo/coin.block.go @@ -175,10 +175,10 @@ func SKY_coin_BlockHeader_Hash(_bh C.BlockHeader__Handle, _arg0 *C.cipher__SHA25 } //export SKY_coin_BlockHeader_Bytes -func SKY_coin_BlockHeader_Bytes(_bh *C.coin__BlockHeader, _arg0 *[]byte) (____error_code uint32) { +func SKY_coin_BlockHeader_Bytes(_bh *C.coin__BlockHeader, _arg0 *C.GoSlice_) (____error_code uint32) { bh := *(*coin.BlockHeader)(unsafe.Pointer(_bh)) __arg0 := bh.Bytes() - *_arg0 = __arg0 + copyToGoSlice(reflect.ValueOf(__arg0), _arg0) return }