File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import 'dart:ffi' ;
22import 'package:ffi/ffi.dart' ;
33
4- typedef c_judger_func = Pointer <Utf8 > Function (
5- Pointer <Utf8 >,
6- Pointer <Utf8 >,
7- Pointer <Utf8 >,
8- );
9-
10- typedef dart_judger_func = Pointer <Utf8 > Function (
11- Pointer <Utf8 >,
12- Pointer <Utf8 >,
13- Pointer <Utf8 >,
14- );
4+ typedef c_judger_func = Pointer <Utf8 > Function (Pointer <Utf8 >, Pointer <Utf8 >, Pointer <Utf8 >);
5+ typedef dart_judger_func = Pointer <Utf8 > Function (Pointer <Utf8 >, Pointer <Utf8 >, Pointer <Utf8 >);
156
167// Define the bindings for my library
178class JudgerLib {
189 late final DynamicLibrary _lib;
1910 late final dart_judger_func runJudge;
2011
2112 JudgerLib (this ._lib) {
22- runJudge = _lib
23- .lookup <NativeFunction <c_judger_func>>('runJudge' )
24- .asFunction ();
13+ runJudge = _lib.lookup <NativeFunction <c_judger_func>>('runJudge' ).asFunction ();
2514 }
2615
2716 // Function "translating" between the library and the flutter code
You can’t perform that action at this time.
0 commit comments