1111
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
#ifndef __SINGLETON_H__
|
||||
#define __SINGLETON_H__
|
||||
#ifndef __SINGLETON_H__RINDRO_
|
||||
#define __SINGLETON_H__RINDRO_
|
||||
|
||||
//饿汉模式
|
||||
#define SINGLETON_DEFINE_S(TypeName) \
|
||||
static TypeName* Get() \
|
||||
{ \
|
||||
static TypeName type_instance; \
|
||||
return &type_instance; \
|
||||
} \
|
||||
\
|
||||
TypeName(const TypeName&) = delete; \
|
||||
TypeName& operator=(const TypeName&) = delete
|
||||
#define RINDRO_SINGLETON_DEFINE_S(TypeName) \
|
||||
static TypeName *Get() \
|
||||
{ \
|
||||
static TypeName type_rindro_instance; \
|
||||
return &type_rindro_instance; \
|
||||
} \
|
||||
\
|
||||
TypeName(const TypeName &) = delete; \
|
||||
TypeName &operator=(const TypeName &) = delete
|
||||
|
||||
#endif // __SINGLETON_H__
|
||||
|
||||
@@ -90,7 +90,7 @@ static SQInteger L_HookFunc(HSQUIRRELVM v)
|
||||
EXAMPLE_LISTENER(listener)->CallBackOnLeave = CallBackOnLeave;
|
||||
|
||||
gum_interceptor_begin_transaction(interceptor);
|
||||
gum_interceptor_attach_listener(interceptor, GSIZE_TO_POINTER(FuncAddress), listener, GSIZE_TO_POINTER(FuncAddress));
|
||||
gum_interceptor_attach(interceptor, GSIZE_TO_POINTER(FuncAddress), listener, GSIZE_TO_POINTER(FuncAddress));
|
||||
gum_interceptor_end_transaction(interceptor);
|
||||
|
||||
sq_pushuserpointer(v, listener);
|
||||
@@ -104,7 +104,7 @@ static SQInteger L_DeHookFunc(HSQUIRRELVM v)
|
||||
sq_getuserpointer(v, 2, &FuncAddress);
|
||||
|
||||
GumInvocationListener *listener = (GumInvocationListener *)FuncAddress;
|
||||
gum_interceptor_detach_listener(interceptor, listener);
|
||||
gum_interceptor_detach(interceptor, listener);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
7719
include/frida-gum.h
7719
include/frida-gum.h
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user