rename API uc_mem_free() to uc_free(). see #662

This commit is contained in:
Nguyen Anh Quynh
2017-01-10 20:59:14 +08:00
parent 7512ff57de
commit bc569f5a54
11 changed files with 18 additions and 18 deletions

View File

@ -117,7 +117,7 @@ instance Storable MemoryRegion where
-- | Opaque storage for CPU context, used with the context functions.
{# pointer *uc_context as Context
foreign finalizer uc_mem_free_wrapper as memFree
foreign finalizer uc_free_wrapper as memFree
newtype
#}
@ -125,7 +125,7 @@ instance Storable MemoryRegion where
{# pointer *uc_context as ContextPtr -> Context #}
-- | Make a CPU context out of a context pointer. The returned CPU context will
-- automatically call 'uc_mem_free' when it goes out of scope.
-- automatically call 'uc_free' when it goes out of scope.
mkContext :: ContextPtr
-> IO Context
mkContext ptr =

View File

@ -7,6 +7,6 @@ void uc_close_wrapper(uc_engine *uc) {
void uc_close_dummy(uc_engine *uc) {
}
void uc_mem_free_wrapper(void *mem) {
uc_mem_free(mem);
void uc_free_wrapper(void *mem) {
uc_free(mem);
}

View File

@ -14,8 +14,8 @@ void uc_close_wrapper(uc_engine *uc);
void uc_close_dummy(uc_engine *uc);
/*
* Wrap Unicorn's uc_mem_free function and ignore the returned error code.
* Wrap Unicorn's uc_free function and ignore the returned error code.
*/
void uc_mem_free_wrapper(void *context);
void uc_free_wrapper(void *context);
#endif