mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-21 20:26:41 +00:00
Use C.GoBytes
This commit is contained in:
parent
da689d1d80
commit
291e750616
1 changed files with 1 additions and 3 deletions
|
|
@ -163,9 +163,7 @@ func (self *JitVm) Run(me, caller ContextRef, code []byte, value, gas, price *bi
|
|||
gasLeft := llvm2big(&data.elems[Gas]) // TODO: Set value directly to gas instance
|
||||
gas.Set(gasLeft)
|
||||
if result.returnCode == 1 { // RETURN
|
||||
returnData := llvm2bytes((*byte)(result.returnData), uint64(result.returnDataSize))
|
||||
ret = make([]byte, len(returnData))
|
||||
copy(ret, returnData)
|
||||
ret = C.GoBytes(result.returnData, C.int(result.returnDataSize))
|
||||
C.free(result.returnData)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue