chore: upgrade ffigen

This commit is contained in:
Aleksey Kulikov 2021-09-17 21:15:40 +03:00
parent 825f3f9926
commit 2fd43f3efe
6 changed files with 8186 additions and 15490 deletions

File diff suppressed because it is too large Load diff

View file

@ -193,7 +193,8 @@ int numHunks(Pointer<git_patch> patch) => libgit2.git_patch_num_hunks(patch);
Map<String, dynamic> hunk(Pointer<git_patch> patch, int hunkIdx) {
final out = calloc<Pointer<git_diff_hunk>>();
final linesInHunk = calloc<Int32>();
final error = libgit2.git_patch_get_hunk(out, linesInHunk, patch, hunkIdx);
final error =
libgit2.git_patch_get_hunk(out, linesInHunk.cast(), patch, hunkIdx);
final result = <String, dynamic>{};
if (error < 0) {

View file

@ -7,8 +7,8 @@
#ifndef INCLUDE_sys_git_credential_h__
#define INCLUDE_sys_git_credential_h__
#include "git2/common.h"
#include "git2/credential.h"
#include "../common.h"
#include "../credential.h"
/**
* @file git2/sys/cred.h

View file

@ -3,13 +3,13 @@ description: Dart bindings to libgit2
version: 0.0.1
environment:
sdk: ">=2.12.0 <3.0.0"
sdk: ">=2.15.0-82.0.dev <3.0.0"
dependencies:
dev_dependencies:
lints: ^1.0.1
ffigen: ^3.1.0-dev.1
ffigen: ^4.0.0
test: ^1.17.5
path: ^1.8.0
@ -25,3 +25,5 @@ ffigen:
length: full
llvm-path:
- "/usr/lib64/libclang.so"
compiler-opts:
- "-I/lib64/clang/12.0.1/include"

View file

@ -94,7 +94,7 @@ void main() {
expect(commit.parents[0].sha, mergeCommit);
commit.free();
}, skip: 'skipped because of flaky segfaults');
});
test('successfully creates commit without parents', () {
final oid = Commit.create(
@ -118,7 +118,7 @@ void main() {
expect(commit.parents.length, 0);
commit.free();
}, skip: 'skipped because of flaky segfaults');
});
test('successfully creates commit with 2 parents', () {
final oid = Commit.create(
@ -144,7 +144,7 @@ void main() {
expect(commit.parents[1].sha, 'fc38877b2552ab554752d9a77e1f48f738cca79b');
commit.free();
}, skip: 'skipped because of flaky segfaults');
});
test('successfully creates commit with short sha of tree', () {
final oid = Commit.create(
@ -169,6 +169,6 @@ void main() {
expect(commit.parents[0].sha, mergeCommit);
commit.free();
}, skip: 'skipped because of flaky segfaults');
});
});
}

View file

@ -315,7 +315,7 @@ index e69de29..c217c63 100644
expect(hunk.oldLines, 0);
expect(hunk.newStart, 1);
expect(hunk.newLines, 1);
expect(hunk.header, '\x00\x00\x00\x00@@ -0,0 +1');
expect(hunk.header, '@@ -0,0 +1 @@\n');
patch.free();
diff.free();