Skip to content

Commit

Permalink
fix native function definition
Browse files Browse the repository at this point in the history
  • Loading branch information
douyixuan committed Sep 7, 2024
1 parent 4502acf commit dcd8509
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions pkg/ckb/native.cell
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
package ckb

type ByteSlice table {
len uint32
cap uint32
offset uint32
ptr *uint8
}

extern (
func __slice_get_ptr(s uintptr) *uint8
func __slice_set_len(s uintptr, size uint32)
func __slice_get_ptr(s *ByteSlice) *uint8
func __slice_set_len(s *ByteSlice, size uint32)
// reference from ckb_syscall_apis.h
func ckb_load_tx_hash(addr *uint8, len *uint64, offset uint) int
func ckb_load_transaction(addr *uint8, len *uint64, offset uint) int
Expand Down

0 comments on commit dcd8509

Please sign in to comment.