Skip to content

Commit

Permalink
* Fix Parser incorrectly casting const pointers to template argu…
Browse files Browse the repository at this point in the history
…ments of pointer types (pull #677)
  • Loading branch information
HGuillemet committed May 16, 2023
1 parent b0a8e89 commit 78b9450
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix `Parser` incorrectly casting `const` pointers to template arguments of pointer types ([pull #677](https://github.com/bytedeco/javacpp/pull/677))
* Fix `Parser` with `Info.enumerate` failing to translate `enum` values based on other `enum` values
* Fix `Parser` prematurely expanding macros defined in `class`, `struct` or `union` ([issue #674](https://github.com/bytedeco/javacpp/issues/674))
* Add `Info.upcast` to support class hierarchies with virtual inheritance ([pull #671](https://github.com/bytedeco/javacpp/pull/671))
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -906,6 +906,9 @@ Type type(Context context, boolean definition) throws ParserException {
type.indirections++;
if (type.reference) {
type.constValue = false;
} else if (type.constValue) {
type.constValue = false;
type.constPointer = true; // For good measure. constPointer is ignored in this case.
}
type.cppName = type.cppName.substring(0, type.cppName.length() - 1);
}
Expand Down

0 comments on commit 78b9450

Please sign in to comment.