Skip to content

Commit

Permalink
* Let Generator dereference long arguments @ByVal or @ByRef
Browse files Browse the repository at this point in the history
…with `@Cast("...*")` (issue #576)
  • Loading branch information
saudet committed Jun 4, 2022
1 parent 3d0256c commit 23664f6
Show file tree
Hide file tree
Showing 2 changed files with 3 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 @@

* Let `Generator` dereference `long` arguments `@ByVal` or `@ByRef` with `@Cast("...*")` ([issue #576](https://github.com/bytedeco/javacpp/issues/576))
* Add `BytePointer.getUnsigned()` and `putUnsigned()` methods for convenience ([pull #574](https://github.com/bytedeco/javacpp/pull/574))
* Let `Parser` consider `alignas` as an explicit attribute to be ignored by default ([issue bytedeco/javacpp-presets#1168](https://github.com/bytedeco/javacpp-presets/issues/1168))
* Add "org.bytedeco.javacpp.findLibraries" system property to disable search for libraries ([pull #565](https://github.com/bytedeco/javacpp/pull/565))
Expand Down
2 changes: 2 additions & 0 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -2695,6 +2695,8 @@ void call(MethodInformation methodInfo, String returnPrefix, boolean secondCall)
} else if (methodInfo.parameterTypes[j].isPrimitive()) {
if (passBy instanceof ByPtr || passBy instanceof ByPtrRef) {
out.print("&");
} else if ((passBy instanceof ByVal || passBy instanceof ByRef) && cast.endsWith("*)")) {
out.print("*");
}
out.print(cast + "arg" + j);
} else if (adapterInfo != null) {
Expand Down

0 comments on commit 23664f6

Please sign in to comment.