Skip to content

Commit

Permalink
test change
Browse files Browse the repository at this point in the history
  • Loading branch information
parzysty committed Aug 24, 2023
1 parent 14f5bf1 commit 7bce92a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,19 +36,19 @@
{{#resolveName}}{{#setJoin "varName" "_" this "Handle" delimiter=""}}{{>dart/DartFfiReleaseHandle}}{{/setJoin}}{{/resolveName}}
{{/parameters}}
{{#if this.thrownType}}
if (_{{resolveName}}{{resolveName "Ffi"}}ReturnHasError(__callResultHandle) != 0) {
final __errorHandle = _{{resolveName}}{{resolveName "Ffi"}}ReturnGetError(__callResultHandle);
_{{resolveName}}{{resolveName "Ffi"}}ReturnReleaseHandle(__callResultHandle);
if (_{{resolveName "Ffi"}}ReturnHasError(__callResultHandle) != 0) {
final __errorHandle = _{{resolveName "Ffi"}}ReturnGetError(__callResultHandle);
_{{resolveName "Ffi"}}ReturnReleaseHandle(__callResultHandle);
try {
throw {{resolveName exception}}({{#set call="FromFfi" typeRef=exception.errorType}}{{>dart/DartFfiConversionCall}}{{/set}}(__errorHandle));
} finally {
{{#set typeRef=exception.errorType varName="__errorHandle"}}{{>dart/DartFfiReleaseHandle}}{{/set}}
}
}
{{#unless returnType.isVoid}}
final __resultHandle = _{{resolveName}}{{resolveName "Ffi"}}ReturnGetResult(__callResultHandle);
final __resultHandle = _{{resolveName "Ffi"}}ReturnGetResult(__callResultHandle);
{{/unless}}
_{{resolveName}}{{resolveName "Ffi"}}ReturnReleaseHandle(__callResultHandle);
_{{resolveName "Ffi"}}ReturnReleaseHandle(__callResultHandle);
{{/if}}
{{#if isConstructor}}{{#if isStruct}}{{>ffiReturnConversion}}{{/if}}{{!!
}}{{#unless isStruct}} return __resultHandle;{{/unless}}{{/if}}{{!!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
!
!}}
{{#if thrownType}}{{#unless attributes.async}}
final _{{resolveName}}{{resolveName "Ffi"}}ReturnReleaseHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
final _{{resolveName "Ffi"}}ReturnReleaseHandle = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Void Function(Pointer<Void>),
void Function(Pointer<Void>)
>('{{>dart/DartFunctionFfiName}}_return_release_handle'));
{{#unless returnType.isVoid}}
final _{{resolveName}}{{resolveName "Ffi"}}ReturnGetResult = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
final _{{resolveName "Ffi"}}ReturnGetResult = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
{{resolveName returnType.typeRef "FfiApiTypes"}} Function(Pointer<Void>),
{{resolveName returnType.typeRef "FfiDartTypes"}} Function(Pointer<Void>)
>('{{>dart/DartFunctionFfiName}}_return_get_result'));
{{/unless}}
final _{{resolveName}}{{resolveName "Ffi"}}ReturnGetError = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
final _{{resolveName "Ffi"}}ReturnGetError = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
{{resolveName exception.errorType "FfiApiTypes"}} Function(Pointer<Void>),
{{resolveName exception.errorType "FfiDartTypes"}} Function(Pointer<Void>)
>('{{>dart/DartFunctionFfiName}}_return_get_error'));
final _{{resolveName}}{{resolveName "Ffi"}}ReturnHasError = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
final _{{resolveName "Ffi"}}ReturnHasError = __lib.catchArgumentError(() => __lib.nativeLibrary.lookupFunction<
Uint8 Function(Pointer<Void>),
int Function(Pointer<Void>)
>('{{>dart/DartFunctionFfiName}}_return_has_error'));
Expand Down

0 comments on commit 7bce92a

Please sign in to comment.