Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Commit

Permalink
Exclude all on empty include list (#254)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukaslihotzki committed Nov 12, 2021
1 parent abd961d commit da1ee95
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 4.1.2
- Added fix for empty include list to exclude all

# 4.1.1
- Added fix for errors due to name collision between member name
and type name used internally in structs/unions.
Expand Down
3 changes: 3 additions & 0 deletions lib/src/config_provider/spec_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -397,6 +397,9 @@ Includer _extractIncluderFromYaml(dynamic yamlMap) {

final include = (yamlMap[strings.include] as YamlList?)?.cast<String>();
if (include != null) {
if (include.isEmpty) {
return Includer.excludeByDefault();
}
for (final str in include) {
if (isFullDeclarationName(str)) {
includeFull.add(str);
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# BSD-style license that can be found in the LICENSE file.

name: ffigen
version: 4.1.1
version: 4.1.2
homepage: https://github.com/dart-lang/ffigen
description: Generator for FFI bindings, using LibClang to parse C header files.

Expand Down

0 comments on commit da1ee95

Please sign in to comment.