fromFunctionPointer static method
ObjCBlock<Pointer<__CFArray> Function(Pointer<__CFDictionary> , Int)>
fromFunctionPointer(
- Pointer<
NativeFunction< ptrPointer< >__CFArray> Function(Pointer<__CFDictionary> , Int)>
Creates a block from a C function pointer.
This block must be invoked by native code running on the same thread as the isolate that registered it. Invoking the block on the wrong thread will result in a crash.
Implementation
static objc.ObjCBlock<
ffi.Pointer<__CFArray> Function(ffi.Pointer<__CFDictionary>, ffi.Int)
>
fromFunctionPointer(
ffi.Pointer<
ffi.NativeFunction<CFArrayRef Function(CFDictionaryRef arg0, pid_t arg1)>
>
ptr,
) =>
objc.ObjCBlock<
ffi.Pointer<__CFArray> Function(ffi.Pointer<__CFDictionary>, ffi.Int)
>(
objc.newPointerBlock(
_ObjCBlock_CFArrayRef_CFDictionaryRef_pidt_fnPtrCallable,
ptr.cast(),
),
retain: false,
release: true,
);