JSCFunctionType.defFF constructor
JSCFunctionType.defFF(
- JSContext _ctx, {
- JSCFunctionFFFunction_? func,
- bool autoDispose = true,
Implementation
JSCFunctionType.defFF(
this._ctx, {
JSCFunctionFFFunction_? func,
bool autoDispose = true,
}) {
_cfuncFFFuncNC = NativeCallable.isolateLocal((double a) {
return func?.call(a);
}, exceptionalReturn: 0.0);
_ref = calloc.call(sizeOf<JSCFunctionType_>())
..ref.f_f = _cfuncFFFuncNC!.nativeFunction;
attach(calloc.nativeFree, _ref.cast(), autoDispose: autoDispose);
}