Skip to content

Commit

Permalink
* Fix Parser failing on variables with direct list initialization …
Browse files Browse the repository at this point in the history
…`{ ... }` (issue #223)
  • Loading branch information
saudet committed Jan 29, 2018
1 parent c579b22 commit 7cba4d6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix `Parser` failing on variables with direct list initialization `{ ... }` ([issue #223](https://github.com/bytedeco/javacpp/issues/223))
* Allow `Parser` to map and cast function pointers to `Pointer`

### January 16, 2018 version 1.4
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -1977,7 +1977,7 @@ boolean variable(Context context, DeclarationList declList) throws ParserExcepti
dcl.type.annotations += attr.javaName;
}

if (cppName == null || javaName == null || !tokens.get().match('(', '[', '=', ',', ':', ';')) {
if (cppName == null || javaName == null || !tokens.get().match('(', '[', '=', ',', ':', ';', '{')) {
tokens.index = backIndex;
return false;
} else if (!dcl.type.staticMember && context.javaName != null) {
Expand Down

0 comments on commit 7cba4d6

Please sign in to comment.