fix Go types on uc_mem_read() and uc_mem_write()

This commit is contained in:
Ryan Hileman 2015-09-07 19:24:53 -07:00
parent 1724fabb05
commit 185b7a7cef
1 changed files with 2 additions and 2 deletions

View File

@ -75,14 +75,14 @@ func (u *Uc) MemWrite(addr uint64, data []byte) error {
if len(data) == 0 { if len(data) == 0 {
return nil return nil
} }
return errReturn(C.uc_mem_write(u.Handle, C.uint64_t(addr), (*C.uint8_t)(unsafe.Pointer(&data[0])), C.size_t(len(data)))) return errReturn(C.uc_mem_write(u.Handle, C.uint64_t(addr), unsafe.Pointer(&data[0]), C.size_t(len(data))))
} }
func (u *Uc) MemReadInto(dst []byte, addr uint64) error { func (u *Uc) MemReadInto(dst []byte, addr uint64) error {
if len(dst) == 0 { if len(dst) == 0 {
return nil return nil
} }
return errReturn(C.uc_mem_read(u.Handle, C.uint64_t(addr), (*C.uint8_t)(unsafe.Pointer(&dst[0])), C.size_t(len(dst)))) return errReturn(C.uc_mem_read(u.Handle, C.uint64_t(addr), unsafe.Pointer(&dst[0]), C.size_t(len(dst))))
} }
func (u *Uc) MemRead(addr, size uint64) ([]byte, error) { func (u *Uc) MemRead(addr, size uint64) ([]byte, error) {