remove UC_ prefix for go binding consts

This commit is contained in:
Ryan Hileman
2015-09-07 19:25:13 -07:00
parent 185b7a7cef
commit 7beb90ca95
11 changed files with 2370 additions and 2369 deletions

View File

@@ -17,7 +17,7 @@ func (u UcError) Error() string {
}
func errReturn(err C.uc_err) error {
if err != UC_ERR_OK {
if err != ERR_OK {
return UcError(err)
}
return nil
@@ -36,10 +36,10 @@ func NewUc(arch, mode int) (*Uc, error) {
var major, minor C.uint
C.uc_version(&major, &minor)
if major != C.UC_API_MAJOR || minor != C.UC_API_MINOR {
return nil, UcError(UC_ERR_VERSION)
return nil, UcError(ERR_VERSION)
}
var handle *C.uc_engine
if ucerr := C.uc_open(C.uc_arch(arch), C.uc_mode(mode), &handle); ucerr != UC_ERR_OK {
if ucerr := C.uc_open(C.uc_arch(arch), C.uc_mode(mode), &handle); ucerr != ERR_OK {
return nil, UcError(ucerr)
}
uc := &Uc{handle, arch, mode}
@@ -95,5 +95,5 @@ func (u *Uc) MemMapProt(addr, size uint64, prot int) error {
}
func (u *Uc) MemMap(addr, size uint64) error {
return u.MemMapProt(addr, size, UC_PROT_ALL)
return u.MemMapProt(addr, size, PROT_ALL)
}