fix: modify the way of communication from C to Go.

This commit is contained in:
Gordon 2023-09-03 18:08:08 +08:00 committed by Gordon
parent 1c41cd0f5d
commit ba502b29c6

View File

@ -6,17 +6,14 @@ typedef void (*CB_I_S)(int,char *);
typedef void (*CB_I_S_S)(int,char *,char *); typedef void (*CB_I_S_S)(int,char *,char *);
typedef void (*CB_I_S_S_I)(int,char *,char *,int); typedef void (*CB_I_S_S_I)(int,char *,char *,int);
__attribute__((weak))
void Call_CB_I_S(CB_I_S func,int event,char* data) void Call_CB_I_S(CB_I_S func,int event,char* data)
{ {
func(event,data); func(event,data);
} }
__attribute__((weak))
void Call_CB_I_S_S(CB_I_S_S func,int errCode,char* errMsg,char* data) void Call_CB_I_S_S(CB_I_S_S func,int errCode,char* errMsg,char* data)
{ {
func(errCode,errMsg,data); func(errCode,errMsg,data);
} }
__attribute__((weak))
void Call_CB_I_S_S_I(CB_I_S_S_I func,int errCode,char* errMsg,char* data,int progress) void Call_CB_I_S_S_I(CB_I_S_S_I func,int errCode,char* errMsg,char* data,int progress)
{ {
func(errCode,errMsg,data,progress); func(errCode,errMsg,data,progress);