aboutsummaryrefslogtreecommitdiff
path: root/stream.go
diff options
context:
space:
mode:
authorDeterminant <tederminant@gmail.com>2019-06-11 14:27:26 -0400
committerDeterminant <tederminant@gmail.com>2019-06-11 14:27:26 -0400
commit69d0435bcc88cc8b4c140b876df5fcfb827b40ef (patch)
treeabeafbf520d345398ac5081675df17891c862413 /stream.go
parent1b2215ae2c792f96765a15c7ffcc6f20e3046cc7 (diff)
...
Diffstat (limited to 'stream.go')
-rw-r--r--stream.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/stream.go b/stream.go
index ebfaaf4..6a5d549 100644
--- a/stream.go
+++ b/stream.go
@@ -20,7 +20,7 @@ func NewDataStreamFromBytes(bytes []byte) DataStream {
size := len(bytes)
if size > 0 {
base := (*C.uint8_t)(&bytes[0])
- return C.datastream_new_from_bytes(base, base + uintptr(size))
+ return C.datastream_new_from_bytes(base, C.size_t(size))
} else {
return C.datastream_new()
}
@@ -56,7 +56,7 @@ func (self DataStream) PutData(bytes []byte) {
size := len(bytes)
if size > 0 {
base := (*C.uint8_t)(&bytes[0])
- C.datastream_put_data(self, base, base + uintptr(size))
+ C.datastream_put_data(self, base, C.size_t(size))
}
}
@@ -73,7 +73,7 @@ func (self DataStream) GetI64() int64 { return int64(C.datastream_get_i64(self))
func (self DataStream) GetDataInPlace(length int) []byte {
base := C.datastream_get_data_inplace(self, C.size_t(length))
- return C.GoBytes(base, C.int(length))
+ return C.GoBytes(rawptr_t(base), C.int(length))
}
type UInt256 = *C.uint256_t