mirror of
https://gitee.com/openharmony/napi_generator
synced 2024-12-02 14:36:31 +00:00
!360 [napi tool]Modify pxt valid judgement repeat
Merge pull request !360 from zhaojunxia/master
This commit is contained in:
commit
4fa9693163
@ -68,9 +68,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
[unwarp_instance]
|
||||
struct [funcName]_value_struct *vio = new [funcName]_value_struct();
|
||||
[valueCheckout][optionalCallbackInit][start_async]
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
return result;
|
||||
}`
|
||||
|
||||
|
@ -45,9 +45,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
napi_value result = nullptr;
|
||||
[valuePackage][optionalParamDestory]
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}`
|
||||
|
@ -50,9 +50,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
|
||||
napi_value result = pxt->UndefinedValue();
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}
|
||||
|
@ -64,9 +64,6 @@ napi_value [middleClassName][funcName]_middle(napi_env env, napi_callback_info i
|
||||
|
||||
[optionalParamDestory]
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}`
|
||||
@ -194,7 +191,7 @@ function fillValueStruct(type, param, outName) {
|
||||
if (param.callback.returnType === 'void') {
|
||||
param.valueDefine += "%sbool& %s".format(param.valueDefine.length > 0 ? ", " : "", outName)
|
||||
}
|
||||
} else if (type.substring(0, 12) == "NUMBER_TYPE_") {
|
||||
} else if (type.substring(0, 12) === "NUMBER_TYPE_") {
|
||||
param.valueOut += '%s %s;\n'.format(type, outName)
|
||||
if (param.callback.returnType === 'void') {
|
||||
param.valueDefine += "%s%s& %s".format(param.valueDefine.length > 0 ? ", " : "", type, outName)
|
||||
|
@ -71,9 +71,6 @@ napi_value [middleClassName]createThreadSafeFunc[funcName]_middle(napi_env env,
|
||||
XNapiTool::CallThreadSafeFunc(vio->eventName);
|
||||
napi_value result = pxt->UndefinedValue();
|
||||
delete vio;
|
||||
if (pxt->IsFailed()) {
|
||||
result = pxt->GetError();
|
||||
}
|
||||
delete pxt; // release
|
||||
return result;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user