Skip to content

Commit dcd8509

Browse files
committed
fix native function definition
1 parent 4502acf commit dcd8509

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

pkg/ckb/native.cell

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
package ckb
22

3+
type ByteSlice table {
4+
len uint32
5+
cap uint32
6+
offset uint32
7+
ptr *uint8
8+
}
9+
310
extern (
4-
func __slice_get_ptr(s uintptr) *uint8
5-
func __slice_set_len(s uintptr, size uint32)
11+
func __slice_get_ptr(s *ByteSlice) *uint8
12+
func __slice_set_len(s *ByteSlice, size uint32)
613
// reference from ckb_syscall_apis.h
714
func ckb_load_tx_hash(addr *uint8, len *uint64, offset uint) int
815
func ckb_load_transaction(addr *uint8, len *uint64, offset uint) int

0 commit comments

Comments
 (0)