From 52af943e7347a2069a4f25680a0ae61cc8c239f4 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Fri, 25 Aug 2023 16:10:29 +1200 Subject: [PATCH 1/2] Bump CI SDK version to 3.1.0 --- .github/workflows/test-package.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index df0d88a8..581fd705 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -19,7 +19,7 @@ jobs: strategy: fail-fast: false matrix: - sdk: [3.0.0] + sdk: [3.1.0] steps: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f @@ -44,7 +44,7 @@ jobs: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: 3.0.0 + sdk: 3.1.0 - name: Install dependencies run: dart pub get - name: Install libclang-14-dev @@ -61,7 +61,7 @@ jobs: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: 3.0.0 + sdk: 3.1.0 - name: Install dependencies run: dart pub get - name: Build test dylib and bindings @@ -83,7 +83,7 @@ jobs: - uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 - uses: dart-lang/setup-dart@d6a63dab3335f427404425de0fbfed4686d93c4f with: - sdk: 3.0.0 + sdk: 3.1.0 - name: Install dependencies run: dart pub get - name: Build test dylib and bindings From 56e68727ac2be274385a6da0e9b740ddd3ada889 Mon Sep 17 00:00:00 2001 From: Liam Appelbe Date: Fri, 25 Aug 2023 16:13:49 +1200 Subject: [PATCH 2/2] Format --- example/c_json/cjson_generated_bindings.dart | 55 +++--- .../libclang-example/generated_bindings.dart | 28 +-- example/objective_c/avf_audio_bindings.dart | 177 ++++++++--------- example/simple/generated_bindings.dart | 5 +- example/swift/swift_api_bindings.dart | 86 +++++---- .../clang_bindings/clang_bindings.dart | 6 +- .../_expected_boolean_dartbool_bindings.dart | 5 +- .../_expected_functions_bindings.dart | 5 +- ..._expected_struct_fptr_fields_bindings.dart | 6 +- .../_expected_cjson_bindings.dart | 55 +++--- .../_expected_libclang_bindings.dart | 50 ++--- .../_expected_sqlite_bindings.dart | 179 ++++++++++-------- 12 files changed, 346 insertions(+), 311 deletions(-) diff --git a/example/c_json/cjson_generated_bindings.dart b/example/c_json/cjson_generated_bindings.dart index 0fb9e1aa..fa9e56ef 100644 --- a/example/c_json/cjson_generated_bindings.dart +++ b/example/c_json/cjson_generated_bindings.dart @@ -73,8 +73,9 @@ class CJson { } late final _cJSON_ParsePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('cJSON_Parse'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_Parse'); late final _cJSON_Parse = _cJSON_ParsePtr .asFunction Function(ffi.Pointer)>(); @@ -109,8 +110,9 @@ class CJson { } late final _cJSON_PrintPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('cJSON_Print'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_Print'); late final _cJSON_Print = _cJSON_PrintPtr .asFunction Function(ffi.Pointer)>(); @@ -123,9 +125,9 @@ class CJson { } late final _cJSON_PrintUnformattedPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_PrintUnformatted'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_PrintUnformatted'); late final _cJSON_PrintUnformatted = _cJSON_PrintUnformattedPtr .asFunction Function(ffi.Pointer)>(); @@ -286,9 +288,9 @@ class CJson { } late final _cJSON_GetStringValuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_GetStringValue'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_GetStringValue'); late final _cJSON_GetStringValue = _cJSON_GetStringValuePtr .asFunction Function(ffi.Pointer)>(); @@ -499,9 +501,9 @@ class CJson { } late final _cJSON_CreateStringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateString'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateString'); late final _cJSON_CreateString = _cJSON_CreateStringPtr .asFunction Function(ffi.Pointer)>(); @@ -514,9 +516,9 @@ class CJson { } late final _cJSON_CreateRawPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateRaw'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateRaw'); late final _cJSON_CreateRaw = _cJSON_CreateRawPtr .asFunction Function(ffi.Pointer)>(); @@ -549,9 +551,9 @@ class CJson { } late final _cJSON_CreateStringReferencePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateStringReference'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateStringReference'); late final _cJSON_CreateStringReference = _cJSON_CreateStringReferencePtr .asFunction Function(ffi.Pointer)>(); @@ -1199,9 +1201,9 @@ class CJson { } late final _cJSON_SetNumberHelperPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Double)>>('cJSON_SetNumberHelper'); + ffi + .NativeFunction, ffi.Double)>>( + 'cJSON_SetNumberHelper'); late final _cJSON_SetNumberHelper = _cJSON_SetNumberHelperPtr .asFunction, double)>(); @@ -1256,12 +1258,13 @@ final class cJSON extends ffi.Struct { } final class cJSON_Hooks extends ffi.Struct { - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Size sz)>> + external ffi + .Pointer Function(ffi.Size sz)>> malloc_fn; - external ffi.Pointer< - ffi.NativeFunction ptr)>> free_fn; + external ffi + .Pointer ptr)>> + free_fn; } typedef cJSON_bool = ffi.Int; diff --git a/example/libclang-example/generated_bindings.dart b/example/libclang-example/generated_bindings.dart index 64de33cb..fe7f3c4f 100644 --- a/example/libclang-example/generated_bindings.dart +++ b/example/libclang-example/generated_bindings.dart @@ -205,8 +205,8 @@ class LibClang { } late final _clang_CXIndex_setInvocationEmissionPathOptionPtr = _lookup< - ffi.NativeFunction< - NativeClang_CXIndex_setInvocationEmissionPathOption>>( + ffi + .NativeFunction>( 'clang_CXIndex_setInvocationEmissionPathOption'); late final _clang_CXIndex_setInvocationEmissionPathOption = _clang_CXIndex_setInvocationEmissionPathOptionPtr @@ -2938,8 +2938,8 @@ class LibClang { } late final _clang_Cursor_getTemplateArgumentUnsignedValuePtr = _lookup< - ffi.NativeFunction< - NativeClang_Cursor_getTemplateArgumentUnsignedValue>>( + ffi + .NativeFunction>( 'clang_Cursor_getTemplateArgumentUnsignedValue'); late final _clang_Cursor_getTemplateArgumentUnsignedValue = _clang_Cursor_getTemplateArgumentUnsignedValuePtr @@ -4849,8 +4849,8 @@ class LibClang { } late final _clang_CXXConstructor_isConvertingConstructorPtr = _lookup< - ffi.NativeFunction< - NativeClang_CXXConstructor_isConvertingConstructor>>( + ffi + .NativeFunction>( 'clang_CXXConstructor_isConvertingConstructor'); late final _clang_CXXConstructor_isConvertingConstructor = _clang_CXXConstructor_isConvertingConstructorPtr @@ -6850,8 +6850,8 @@ class _SymbolAddresses { get clang_CXIndex_getGlobalOptions => _library._clang_CXIndex_getGlobalOptionsPtr; ffi.Pointer< - ffi.NativeFunction< - NativeClang_CXIndex_setInvocationEmissionPathOption>> + ffi + .NativeFunction> get clang_CXIndex_setInvocationEmissionPathOption => _library._clang_CXIndex_setInvocationEmissionPathOptionPtr; ffi.Pointer> @@ -7148,8 +7148,8 @@ class _SymbolAddresses { get clang_Cursor_getTemplateArgumentValue => _library._clang_Cursor_getTemplateArgumentValuePtr; ffi.Pointer< - ffi.NativeFunction< - NativeClang_Cursor_getTemplateArgumentUnsignedValue>> + ffi + .NativeFunction> get clang_Cursor_getTemplateArgumentUnsignedValue => _library._clang_Cursor_getTemplateArgumentUnsignedValuePtr; ffi.Pointer> @@ -7406,8 +7406,8 @@ class _SymbolAddresses { get clang_Module_getTopLevelHeader => _library._clang_Module_getTopLevelHeaderPtr; ffi.Pointer< - ffi.NativeFunction< - NativeClang_CXXConstructor_isConvertingConstructor>> + ffi + .NativeFunction> get clang_CXXConstructor_isConvertingConstructor => _library._clang_CXXConstructor_isConvertingConstructorPtr; ffi.Pointer> @@ -11104,8 +11104,8 @@ typedef DartClang_indexLoc_getCXSourceLocation = CXSourceLocation Function( /// The visitor should return one of the \c CXVisitorResult values /// to direct \c clang_Type_visitFields. typedef CXFieldVisitor = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(CXCursor C, CXClientData client_data)>>; + ffi + .NativeFunction>; typedef NativeClang_Type_visitFields = ffi.UnsignedInt Function( CXType T, CXFieldVisitor visitor, CXClientData client_data); typedef DartClang_Type_visitFields = int Function( diff --git a/example/objective_c/avf_audio_bindings.dart b/example/objective_c/avf_audio_bindings.dart index ae0d3fd9..eaa669d7 100644 --- a/example/objective_c/avf_audio_bindings.dart +++ b/example/objective_c/avf_audio_bindings.dart @@ -22381,8 +22381,8 @@ class AVFAudio { ffi.Pointer, ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>)>(); + ffi + .NativeFunction)>>)>(); late final _sel_descriptionFunction1 = _registerName1("descriptionFunction"); ffi.Pointer< @@ -22541,8 +22541,8 @@ class AVFAudio { ffi.Pointer Function( ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>, + ffi + .NativeFunction)>>, ffi.Bool)>> _objc_msgSend_803( ffi.Pointer obj, ffi.Pointer sel, @@ -22553,20 +22553,20 @@ class AVFAudio { ); } - late final __objc_msgSend_803Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< + late final __objc_msgSend_803Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi + .Pointer< ffi.NativeFunction< NSUInteger Function( ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); late final __objc_msgSend_803 = __objc_msgSend_803Ptr.asFunction< ffi.Pointer< ffi.NativeFunction< @@ -36092,16 +36092,17 @@ class ObjCBlock4 extends _ObjCBlockBase { NSUInteger arg1, ffi.Pointer arg2)>> ptr) : this._( - lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Bool Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - NSUInteger arg1, - ffi.Pointer arg2)>( - _ObjCBlock4_fnPtrTrampoline, false) - .cast(), - ptr.cast()), + lib + ._newBlock1( + ffi.Pointer.fromFunction< + ffi.Bool Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + NSUInteger arg1, + ffi.Pointer arg2)>( + _ObjCBlock4_fnPtrTrampoline, false) + .cast(), + ptr.cast()), lib); /// Creates a block from a Dart function. @@ -40641,8 +40642,8 @@ class ObjCBlock15 extends _ObjCBlockBase { ObjCBlock15.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -43044,8 +43045,8 @@ class ObjCBlock16 extends _ObjCBlockBase { void call() { return _id.ref.invoke .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + ffi + .NativeFunction block)>>() .asFunction block)>()(_id); } @@ -44324,8 +44325,8 @@ class ObjCBlock17 extends _ObjCBlockBase { ObjCBlock17.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -47403,15 +47404,16 @@ class ObjCBlock19 extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock19_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock19_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); /// Creates a block from a Dart function. @@ -47560,7 +47562,8 @@ class ObjCBlock21 extends _ObjCBlockBase { ObjCBlock21.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) @@ -47654,15 +47657,16 @@ class ObjCBlock22 extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock22_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock22_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); /// Creates a block from a Dart function. @@ -47811,15 +47815,16 @@ class ObjCBlock24 extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock24_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock24_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); /// Creates a block from a Dart function. @@ -53644,8 +53649,8 @@ class ObjCBlock29 extends _ObjCBlockBase { ObjCBlock29.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -55582,8 +55587,8 @@ class ObjCBlock30 extends _ObjCBlockBase { ObjCBlock30.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -57065,8 +57070,8 @@ class NSPointerFunctions extends NSObject { ffi.Pointer Function( ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>, + ffi + .NativeFunction)>>, ffi.Bool)>> get acquireFunction { return _lib._objc_msgSend_803(_id, _lib._sel_acquireFunction1); } @@ -58822,8 +58827,8 @@ class ObjCBlock33 extends _ObjCBlockBase { ObjCBlock33.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -59834,8 +59839,8 @@ class ObjCBlock35 extends _ObjCBlockBase { ObjCBlock35.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -59902,8 +59907,8 @@ class ObjCBlock36 extends _ObjCBlockBase { ObjCBlock36.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -62217,8 +62222,8 @@ class ObjCBlock38 extends _ObjCBlockBase { ObjCBlock38.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -62442,7 +62447,8 @@ class ObjCBlock39 extends _ObjCBlockBase { ObjCBlock39.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) @@ -63106,15 +63112,16 @@ class ObjCBlock40 extends _ObjCBlockBase { ffi.Pointer arg1)>> ptr) : this._( - lib._newBlock1( - ffi.Pointer.fromFunction< - ffi.Void Function( - ffi.Pointer<_ObjCBlock> block, - ffi.Pointer arg0, - ffi.Pointer arg1)>( - _ObjCBlock40_fnPtrTrampoline) - .cast(), - ptr.cast()), + lib + ._newBlock1( + ffi.Pointer.fromFunction< + ffi.Void Function( + ffi.Pointer<_ObjCBlock> block, + ffi.Pointer arg0, + ffi.Pointer arg1)>( + _ObjCBlock40_fnPtrTrampoline) + .cast(), + ptr.cast()), lib); /// Creates a block from a Dart function. @@ -63770,8 +63777,8 @@ class ObjCBlock43 extends _ObjCBlockBase { ObjCBlock43.fromFunctionPointer( AVFAudio lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( diff --git a/example/simple/generated_bindings.dart b/example/simple/generated_bindings.dart index 71f0414a..b26a8ac7 100644 --- a/example/simple/generated_bindings.dart +++ b/example/simple/generated_bindings.dart @@ -81,8 +81,9 @@ class NativeLibrary { } late final _dividePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Int, ffi.Int)>>('divide'); + ffi + .NativeFunction Function(ffi.Int, ffi.Int)>>( + 'divide'); late final _divide = _dividePtr.asFunction Function(int, int)>(); diff --git a/example/swift/swift_api_bindings.dart b/example/swift/swift_api_bindings.dart index f741f7fa..2a8783aa 100644 --- a/example/swift/swift_api_bindings.dart +++ b/example/swift/swift_api_bindings.dart @@ -22386,8 +22386,8 @@ class SwiftLibrary { ffi.Pointer, ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>)>(); + ffi + .NativeFunction)>>)>(); late final _sel_descriptionFunction1 = _registerName1("descriptionFunction"); ffi.Pointer< @@ -22546,8 +22546,8 @@ class SwiftLibrary { ffi.Pointer Function( ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>, + ffi + .NativeFunction)>>, ffi.Bool)>> _objc_msgSend_803( ffi.Pointer obj, ffi.Pointer sel, @@ -22558,20 +22558,20 @@ class SwiftLibrary { ); } - late final __objc_msgSend_803Ptr = - _lookup< - ffi.NativeFunction< - ffi.Pointer< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer, - ffi.Pointer< + late final __objc_msgSend_803Ptr = _lookup< + ffi.NativeFunction< + ffi.Pointer< + ffi.NativeFunction< + ffi.Pointer Function( + ffi.Pointer, + ffi + .Pointer< ffi.NativeFunction< NSUInteger Function( ffi.Pointer)>>, - ffi.Bool)>> - Function(ffi.Pointer, ffi.Pointer)>>( - 'objc_msgSend'); + ffi.Bool)>> + Function(ffi.Pointer, ffi.Pointer)>>( + 'objc_msgSend'); late final __objc_msgSend_803 = __objc_msgSend_803Ptr.asFunction< ffi.Pointer< ffi.NativeFunction< @@ -34838,7 +34838,11 @@ class ObjCBlock4 extends _ObjCBlockBase { /// Creates a block from a C function pointer. ObjCBlock4.fromFunctionPointer( SwiftLibrary lib, - ffi.Pointer arg0, NSUInteger arg1, ffi.Pointer arg2)>> + ffi.Pointer< + ffi + .NativeFunction< + ffi.Bool Function(ffi.Pointer arg0, + NSUInteger arg1, ffi.Pointer arg2)>> ptr) : this._( lib._newBlock1( @@ -39398,8 +39402,8 @@ class ObjCBlock15 extends _ObjCBlockBase { ObjCBlock15.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -41807,8 +41811,8 @@ class ObjCBlock16 extends _ObjCBlockBase { void call() { return _id.ref.invoke .cast< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer<_ObjCBlock> block)>>() + ffi + .NativeFunction block)>>() .asFunction block)>()(_id); } @@ -43090,8 +43094,8 @@ class ObjCBlock17 extends _ObjCBlockBase { ObjCBlock17.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -46332,7 +46336,8 @@ class ObjCBlock21 extends _ObjCBlockBase { ObjCBlock21.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) @@ -52432,8 +52437,8 @@ class ObjCBlock29 extends _ObjCBlockBase { ObjCBlock29.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -54371,8 +54376,8 @@ class ObjCBlock30 extends _ObjCBlockBase { ObjCBlock30.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -55856,8 +55861,8 @@ class NSPointerFunctions extends NSObject { ffi.Pointer Function( ffi.Pointer, ffi.Pointer< - ffi.NativeFunction< - NSUInteger Function(ffi.Pointer)>>, + ffi + .NativeFunction)>>, ffi.Bool)>> get acquireFunction { return _lib._objc_msgSend_803(_id, _lib._sel_acquireFunction1); } @@ -57616,8 +57621,8 @@ class ObjCBlock33 extends _ObjCBlockBase { ObjCBlock33.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -58632,8 +58637,8 @@ class ObjCBlock35 extends _ObjCBlockBase { ObjCBlock35.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -58700,8 +58705,8 @@ class ObjCBlock36 extends _ObjCBlockBase { ObjCBlock36.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -61015,8 +61020,8 @@ class ObjCBlock38 extends _ObjCBlockBase { ObjCBlock38.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( @@ -61240,7 +61245,8 @@ class ObjCBlock39 extends _ObjCBlockBase { ObjCBlock39.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< + ffi + .NativeFunction< ffi.Void Function(ffi.Pointer arg0, ffi.Bool arg1, ffi.Pointer arg2)>> ptr) @@ -62568,8 +62574,8 @@ class ObjCBlock43 extends _ObjCBlockBase { ObjCBlock43.fromFunctionPointer( SwiftLibrary lib, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer arg0)>> + ffi + .NativeFunction arg0)>> ptr) : this._( lib._newBlock1( diff --git a/lib/src/header_parser/clang_bindings/clang_bindings.dart b/lib/src/header_parser/clang_bindings/clang_bindings.dart index 4c5fba22..fc5ca177 100644 --- a/lib/src/header_parser/clang_bindings/clang_bindings.dart +++ b/lib/src/header_parser/clang_bindings/clang_bindings.dart @@ -1097,9 +1097,9 @@ class Clang { } late final _clang_Cursor_getObjCPropertyAttributesPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(CXCursor, - ffi.UnsignedInt)>>('clang_Cursor_getObjCPropertyAttributes'); + ffi + .NativeFunction>( + 'clang_Cursor_getObjCPropertyAttributes'); late final _clang_Cursor_getObjCPropertyAttributes = _clang_Cursor_getObjCPropertyAttributesPtr .asFunction(); diff --git a/test/code_generator_tests/expected_bindings/_expected_boolean_dartbool_bindings.dart b/test/code_generator_tests/expected_bindings/_expected_boolean_dartbool_bindings.dart index 015821ea..ff7dc120 100644 --- a/test/code_generator_tests/expected_bindings/_expected_boolean_dartbool_bindings.dart +++ b/test/code_generator_tests/expected_bindings/_expected_boolean_dartbool_bindings.dart @@ -29,8 +29,9 @@ class Bindings { } late final _test1Ptr = _lookup< - ffi.NativeFunction< - ffi.Bool Function(ffi.Bool, ffi.Pointer)>>('test1'); + ffi + .NativeFunction)>>( + 'test1'); late final _test1 = _test1Ptr.asFunction)>(); } diff --git a/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart b/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart index 7475b09d..7b6682c4 100644 --- a/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart +++ b/test/header_parser_tests/expected_bindings/_expected_functions_bindings.dart @@ -128,8 +128,9 @@ class NativeLibrary { } late final _diffCharsPtr = _lookup< - ffi.NativeFunction< - ffi.Char Function(ffi.UnsignedChar, ffi.SignedChar)>>('diffChars'); + ffi + .NativeFunction>( + 'diffChars'); late final _diffChars = _diffCharsPtr.asFunction(); late final addresses = _SymbolAddresses(this); diff --git a/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart b/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart index 2b2fe8a3..2a769db2 100644 --- a/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart +++ b/test/header_parser_tests/expected_bindings/_expected_struct_fptr_fields_bindings.dart @@ -8,7 +8,7 @@ final class S extends ffi.Struct { external ffi.Pointer> func1; external ffi - .Pointer> + .Pointer> comparator; external ffi.Pointer< @@ -53,8 +53,8 @@ final class S extends ffi.Struct { @ffi.Array.multi([2]) external ffi.Array< - ffi.Pointer< - ffi.NativeFunction>> + ffi + .Pointer>> manyFunctions; external ffi.Pointer< diff --git a/test/large_integration_tests/_expected_cjson_bindings.dart b/test/large_integration_tests/_expected_cjson_bindings.dart index b93c74f1..f4edb598 100644 --- a/test/large_integration_tests/_expected_cjson_bindings.dart +++ b/test/large_integration_tests/_expected_cjson_bindings.dart @@ -54,8 +54,9 @@ class CJson { } late final _cJSON_ParsePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('cJSON_Parse'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_Parse'); late final _cJSON_Parse = _cJSON_ParsePtr .asFunction Function(ffi.Pointer)>(); @@ -90,8 +91,9 @@ class CJson { } late final _cJSON_PrintPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function(ffi.Pointer)>>('cJSON_Print'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_Print'); late final _cJSON_Print = _cJSON_PrintPtr .asFunction Function(ffi.Pointer)>(); @@ -104,9 +106,9 @@ class CJson { } late final _cJSON_PrintUnformattedPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_PrintUnformatted'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_PrintUnformatted'); late final _cJSON_PrintUnformatted = _cJSON_PrintUnformattedPtr .asFunction Function(ffi.Pointer)>(); @@ -267,9 +269,9 @@ class CJson { } late final _cJSON_GetStringValuePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_GetStringValue'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_GetStringValue'); late final _cJSON_GetStringValue = _cJSON_GetStringValuePtr .asFunction Function(ffi.Pointer)>(); @@ -480,9 +482,9 @@ class CJson { } late final _cJSON_CreateStringPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateString'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateString'); late final _cJSON_CreateString = _cJSON_CreateStringPtr .asFunction Function(ffi.Pointer)>(); @@ -495,9 +497,9 @@ class CJson { } late final _cJSON_CreateRawPtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateRaw'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateRaw'); late final _cJSON_CreateRaw = _cJSON_CreateRawPtr .asFunction Function(ffi.Pointer)>(); @@ -530,9 +532,9 @@ class CJson { } late final _cJSON_CreateStringReferencePtr = _lookup< - ffi.NativeFunction< - ffi.Pointer Function( - ffi.Pointer)>>('cJSON_CreateStringReference'); + ffi + .NativeFunction Function(ffi.Pointer)>>( + 'cJSON_CreateStringReference'); late final _cJSON_CreateStringReference = _cJSON_CreateStringReferencePtr .asFunction Function(ffi.Pointer)>(); @@ -1180,9 +1182,9 @@ class CJson { } late final _cJSON_SetNumberHelperPtr = _lookup< - ffi.NativeFunction< - ffi.Double Function( - ffi.Pointer, ffi.Double)>>('cJSON_SetNumberHelper'); + ffi + .NativeFunction, ffi.Double)>>( + 'cJSON_SetNumberHelper'); late final _cJSON_SetNumberHelper = _cJSON_SetNumberHelperPtr .asFunction, double)>(); @@ -1237,12 +1239,13 @@ final class cJSON extends ffi.Struct { } final class cJSON_Hooks extends ffi.Struct { - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Size sz)>> + external ffi + .Pointer Function(ffi.Size sz)>> malloc_fn; - external ffi.Pointer< - ffi.NativeFunction ptr)>> free_fn; + external ffi + .Pointer ptr)>> + free_fn; } typedef cJSON_bool = ffi.Int; diff --git a/test/large_integration_tests/_expected_libclang_bindings.dart b/test/large_integration_tests/_expected_libclang_bindings.dart index 22c6f266..2bc76881 100644 --- a/test/large_integration_tests/_expected_libclang_bindings.dart +++ b/test/large_integration_tests/_expected_libclang_bindings.dart @@ -133,9 +133,9 @@ class LibClang { } late final _clang_VirtualFileOverlay_setCaseSensitivityPtr = _lookup< - ffi.NativeFunction< - ffi.Int32 Function(CXVirtualFileOverlay, - ffi.Int)>>('clang_VirtualFileOverlay_setCaseSensitivity'); + ffi + .NativeFunction>( + 'clang_VirtualFileOverlay_setCaseSensitivity'); late final _clang_VirtualFileOverlay_setCaseSensitivity = _clang_VirtualFileOverlay_setCaseSensitivityPtr .asFunction(); @@ -384,8 +384,8 @@ class LibClang { } late final _clang_CXIndex_setInvocationEmissionPathOptionPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(CXIndex, ffi.Pointer)>>( + ffi + .NativeFunction)>>( 'clang_CXIndex_setInvocationEmissionPathOption'); late final _clang_CXIndex_setInvocationEmissionPathOption = _clang_CXIndex_setInvocationEmissionPathOptionPtr @@ -453,9 +453,9 @@ class LibClang { } late final _clang_isFileMultipleIncludeGuardedPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(CXTranslationUnit, - CXFile)>>('clang_isFileMultipleIncludeGuarded'); + ffi + .NativeFunction>( + 'clang_isFileMultipleIncludeGuarded'); late final _clang_isFileMultipleIncludeGuarded = _clang_isFileMultipleIncludeGuardedPtr .asFunction(); @@ -943,9 +943,9 @@ class LibClang { } late final _clang_disposeSourceRangeListPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>('clang_disposeSourceRangeList'); + ffi + .NativeFunction)>>( + 'clang_disposeSourceRangeList'); late final _clang_disposeSourceRangeList = _clang_disposeSourceRangeListPtr .asFunction)>(); @@ -3586,9 +3586,9 @@ class LibClang { } late final _clang_constructUSR_ObjCIvarPtr = _lookup< - ffi.NativeFunction< - CXString Function( - ffi.Pointer, CXString)>>('clang_constructUSR_ObjCIvar'); + ffi + .NativeFunction, CXString)>>( + 'clang_constructUSR_ObjCIvar'); late final _clang_constructUSR_ObjCIvar = _clang_constructUSR_ObjCIvarPtr .asFunction, CXString)>(); @@ -3626,9 +3626,9 @@ class LibClang { } late final _clang_constructUSR_ObjCPropertyPtr = _lookup< - ffi.NativeFunction< - CXString Function(ffi.Pointer, - CXString)>>('clang_constructUSR_ObjCProperty'); + ffi + .NativeFunction, CXString)>>( + 'clang_constructUSR_ObjCProperty'); late final _clang_constructUSR_ObjCProperty = _clang_constructUSR_ObjCPropertyPtr .asFunction, CXString)>(); @@ -3900,9 +3900,9 @@ class LibClang { } late final _clang_Cursor_getObjCPropertyAttributesPtr = _lookup< - ffi.NativeFunction< - ffi.UnsignedInt Function(CXCursor, - ffi.UnsignedInt)>>('clang_Cursor_getObjCPropertyAttributes'); + ffi + .NativeFunction>( + 'clang_Cursor_getObjCPropertyAttributes'); late final _clang_Cursor_getObjCPropertyAttributes = _clang_Cursor_getObjCPropertyAttributesPtr .asFunction(); @@ -4595,9 +4595,9 @@ class LibClang { } late final _clang_getTokenExtentPtr = _lookup< - ffi.NativeFunction< - CXSourceRange Function( - CXTranslationUnit, CXToken)>>('clang_getTokenExtent'); + ffi + .NativeFunction>( + 'clang_getTokenExtent'); late final _clang_getTokenExtent = _clang_getTokenExtentPtr .asFunction(); @@ -8225,8 +8225,8 @@ abstract class CXIndexOptFlags { /// Visitor invoked for each field found by a traversal. typedef CXFieldVisitor = ffi.Pointer< - ffi.NativeFunction< - ffi.Int32 Function(CXCursor C, CXClientData client_data)>>; + ffi + .NativeFunction>; const int CINDEX_VERSION_MAJOR = 0; diff --git a/test/large_integration_tests/_expected_sqlite_bindings.dart b/test/large_integration_tests/_expected_sqlite_bindings.dart index af6cccf4..984fad3c 100644 --- a/test/large_integration_tests/_expected_sqlite_bindings.dart +++ b/test/large_integration_tests/_expected_sqlite_bindings.dart @@ -914,8 +914,8 @@ class SQLite { int sqlite3_busy_handler( ffi.Pointer arg0, ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> + ffi + .NativeFunction, ffi.Int)>> arg1, ffi.Pointer arg2, ) { @@ -1410,9 +1410,9 @@ class SQLite { } late final _sqlite3_randomnessPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function( - ffi.Int, ffi.Pointer)>>('sqlite3_randomness'); + ffi + .NativeFunction)>>( + 'sqlite3_randomness'); late final _sqlite3_randomness = _sqlite3_randomnessPtr .asFunction)>(); @@ -4733,10 +4733,11 @@ class SQLite { ffi.Pointer, ffi.Int, ffi.Pointer>)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>)>>( + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer)>>)>>( 'sqlite3_create_function'); late final _sqlite3_create_function = _sqlite3_create_functionPtr.asFunction< int Function( @@ -4810,10 +4811,11 @@ class SQLite { ffi.Pointer, ffi.Int, ffi.Pointer>)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function( - ffi.Pointer)>>)>>( + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function( + ffi.Pointer)>>)>>( 'sqlite3_create_function16'); late final _sqlite3_create_function16 = _sqlite3_create_function16Ptr.asFunction< @@ -4894,9 +4896,10 @@ class SQLite { ffi.Pointer< ffi.NativeFunction< ffi.Void Function(ffi.Pointer)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>)>>( + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>)>>( 'sqlite3_create_function_v2'); late final _sqlite3_create_function_v2 = _sqlite3_create_function_v2Ptr.asFunction< @@ -4987,9 +4990,10 @@ class SQLite { ffi.Pointer, ffi.Int, ffi.Pointer>)>>, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>)>>( + ffi + .Pointer< + ffi.NativeFunction< + ffi.Void Function(ffi.Pointer)>>)>>( 'sqlite3_create_window_function'); late final _sqlite3_create_window_function = _sqlite3_create_window_functionPtr.asFunction< @@ -5294,9 +5298,9 @@ class SQLite { } late final _sqlite3_value_int64Ptr = _lookup< - ffi.NativeFunction< - sqlite3_int64 Function( - ffi.Pointer)>>('sqlite3_value_int64'); + ffi + .NativeFunction)>>( + 'sqlite3_value_int64'); late final _sqlite3_value_int64 = _sqlite3_value_int64Ptr .asFunction)>(); @@ -8361,9 +8365,9 @@ class SQLite { } late final _sqlite3_vfs_registerPtr = _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, ffi.Int)>>('sqlite3_vfs_register'); + ffi + .NativeFunction, ffi.Int)>>( + 'sqlite3_vfs_register'); late final _sqlite3_vfs_register = _sqlite3_vfs_registerPtr .asFunction, int)>(); @@ -9756,8 +9760,9 @@ class SQLite { } late final _sqlite3_logPtr = _lookup< - ffi.NativeFunction< - ffi.Void Function(ffi.Int, ffi.Pointer)>>('sqlite3_log'); + ffi + .NativeFunction)>>( + 'sqlite3_log'); late final _sqlite3_log = _sqlite3_logPtr.asFunction)>(); @@ -10689,21 +10694,22 @@ class SQLite { ); } - late final _sqlite3_rtree_query_callbackPtr = - _lookup< - ffi.NativeFunction< - ffi.Int Function( - ffi.Pointer, - ffi.Pointer, - ffi.Pointer< + late final _sqlite3_rtree_query_callbackPtr = _lookup< + ffi.NativeFunction< + ffi.Int Function( + ffi.Pointer, + ffi.Pointer, + ffi + .Pointer< ffi.NativeFunction< ffi.Int Function( ffi.Pointer)>>, - ffi.Pointer, - ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>>)>>( - 'sqlite3_rtree_query_callback'); + ffi.Pointer, + ffi.Pointer< + ffi + .NativeFunction< + ffi.Void Function(ffi.Pointer)>>)>>( + 'sqlite3_rtree_query_callback'); late final _sqlite3_rtree_query_callback = _sqlite3_rtree_query_callbackPtr.asFunction< int Function( @@ -10804,8 +10810,9 @@ final class sqlite3_vfs extends ffi.Struct { xRandomness; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> xSleep; + ffi + .NativeFunction, ffi.Int)>> + xSleep; external ffi.Pointer< ffi.NativeFunction< @@ -10853,12 +10860,12 @@ typedef sqlite3_syscall_ptr final class sqlite3_mem_methods extends ffi.Struct { /// Memory allocation function external ffi - .Pointer Function(ffi.Int)>> + .Pointer Function(ffi.Int)>> xMalloc; /// Free a prior allocation external ffi - .Pointer)>> + .Pointer)>> xFree; /// Resize an allocation @@ -10869,7 +10876,7 @@ final class sqlite3_mem_methods extends ffi.Struct { /// Return the size of an allocation external ffi - .Pointer)>> + .Pointer)>> xSize; /// Round up request size to allocation size @@ -10877,12 +10884,12 @@ final class sqlite3_mem_methods extends ffi.Struct { /// Initialize the memory allocator external ffi - .Pointer)>> + .Pointer)>> xInit; /// Deinitialize the memory allocator external ffi - .Pointer)>> + .Pointer)>> xShutdown; /// Argument to xInit() and xShutdown() @@ -10984,8 +10991,9 @@ final class sqlite3_module extends ffi.Struct { ffi.Pointer> ppCursor)>> xOpen; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>> xClose; + ffi + .NativeFunction)>> + xClose; external ffi.Pointer< ffi.NativeFunction< @@ -10997,12 +11005,13 @@ final class sqlite3_module extends ffi.Struct { ffi.Pointer>)>> xFilter; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>> xNext; + ffi + .NativeFunction)>> + xNext; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer)>> xEof; + ffi + .NativeFunction)>> xEof; external ffi.Pointer< ffi.NativeFunction< @@ -11063,21 +11072,24 @@ final class sqlite3_module extends ffi.Struct { /// The methods above are in version 1 of the sqlite_module object. Those /// below are for version 2 and greater. external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> xSavepoint; + ffi + .NativeFunction, ffi.Int)>> + xSavepoint; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> xRelease; + ffi + .NativeFunction, ffi.Int)>> + xRelease; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> xRollbackTo; + ffi + .NativeFunction, ffi.Int)>> + xRollbackTo; /// The methods above are in versions 1 and 2 of the sqlite_module object. /// Those below are for version 3 and greater. external ffi - .Pointer)>> + .Pointer)>> xShadowName; } @@ -11296,8 +11308,8 @@ final class sqlite3_mutex_methods extends ffi.Struct { external ffi.Pointer> xMutexEnd; - external ffi.Pointer< - ffi.NativeFunction Function(ffi.Int)>> + external ffi + .Pointer Function(ffi.Int)>> xMutexAlloc; external ffi.Pointer< @@ -11308,20 +11320,20 @@ final class sqlite3_mutex_methods extends ffi.Struct { ffi.NativeFunction)>> xMutexEnter; - external ffi.Pointer< - ffi.NativeFunction)>> + external ffi + .Pointer)>> xMutexTry; external ffi.Pointer< ffi.NativeFunction)>> xMutexLeave; - external ffi.Pointer< - ffi.NativeFunction)>> + external ffi + .Pointer)>> xMutexHeld; - external ffi.Pointer< - ffi.NativeFunction)>> + external ffi + .Pointer)>> xMutexNotheld; } @@ -11344,11 +11356,11 @@ final class sqlite3_pcache_methods2 extends ffi.Struct { external ffi.Pointer pArg; external ffi - .Pointer)>> + .Pointer)>> xInit; external ffi - .Pointer)>> + .Pointer)>> xShutdown; external ffi.Pointer< @@ -11400,11 +11412,11 @@ final class sqlite3_pcache_methods extends ffi.Struct { external ffi.Pointer pArg; external ffi - .Pointer)>> + .Pointer)>> xInit; external ffi - .Pointer)>> + .Pointer)>> xShutdown; external ffi.Pointer< @@ -11489,7 +11501,7 @@ final class sqlite3_rtree_geometry extends ffi.Struct { /// Called by SQLite to clean up pUser external ffi - .Pointer)>> + .Pointer)>> xDelUser; } @@ -11518,7 +11530,7 @@ final class sqlite3_rtree_query_info extends ffi.Struct { /// function to free pUser external ffi - .Pointer)>> + .Pointer)>> xDelUser; /// Coordinates of node or entry to check @@ -11781,8 +11793,8 @@ final class Fts5ExtensionApi extends ffi.Struct { ffi.NativeFunction< ffi.Pointer Function(ffi.Pointer)>> xUserData; - external ffi.Pointer< - ffi.NativeFunction)>> + external ffi + .Pointer)>> xColumnCount; external ffi.Pointer< @@ -11812,13 +11824,14 @@ final class Fts5ExtensionApi extends ffi.Struct { ffi.Int, ffi.Int)>>)>> xTokenize; - external ffi.Pointer< - ffi.NativeFunction)>> + external ffi + .Pointer)>> xPhraseCount; external ffi.Pointer< - ffi.NativeFunction< - ffi.Int Function(ffi.Pointer, ffi.Int)>> xPhraseSize; + ffi + .NativeFunction, ffi.Int)>> + xPhraseSize; external ffi.Pointer< ffi.NativeFunction< @@ -11968,8 +11981,8 @@ final class fts5_api extends ffi.Struct { ffi.Pointer pContext, ffi.Pointer pTokenizer, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>> + ffi + .NativeFunction)>> xDestroy)>> xCreateTokenizer; /// Find an existing tokenizer @@ -11990,8 +12003,8 @@ final class fts5_api extends ffi.Struct { ffi.Pointer pContext, fts5_extension_function xFunction, ffi.Pointer< - ffi.NativeFunction< - ffi.Void Function(ffi.Pointer)>> + ffi + .NativeFunction)>> xDestroy)>> xCreateFunction; }