Skip to content

Commit

Permalink
* Fix Pointer.getPointer() methods sometimes calling the wrong con…
Browse files Browse the repository at this point in the history
…structor (issue bytedeco/javacv#1556)
  • Loading branch information
saudet committed Jan 3, 2021
1 parent 07cd252 commit 20f677c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix `Pointer.getPointer()` methods sometimes calling the wrong constructor ([issue bytedeco/javacv#1556](https://github.com/bytedeco/javacv/issues/1556))
* Prevent Android from trying to load `PointerBufferPoolMXBean` by using it via reflection ([pull #447](https://github.com/bytedeco/javacpp/pull/447))
* Fix Android build properties for NDK r22 and move legacy to `android-*-gcc.properties` ([pull #444](https://github.com/bytedeco/javacpp/pull/444))
* Add support for Mac on ARM processors
Expand Down
4 changes: 2 additions & 2 deletions src/main/java/org/bytedeco/javacpp/tools/Parser.java
Original file line number Diff line number Diff line change
Expand Up @@ -3258,7 +3258,7 @@ boolean group(Context context, DeclarationList declList) throws ParserException
" return (" + shortName + ")super.position(position);\n" +
" }\n" +
" @Override public " + shortName + " getPointer(long i) {\n" +
" return new " + shortName + "(this).position(position + i);\n" +
" return new " + shortName + "((Pointer)this).position(position + i);\n" +
" }\n";
} else {
if ((info == null || !info.purify) && (!abstractClass || ctx.virtualize)) {
Expand All @@ -3277,7 +3277,7 @@ boolean group(Context context, DeclarationList declList) throws ParserException
" return (" + shortName + ")super.position(position);\n" +
" }\n" +
" @Override public " + shortName + " getPointer(long i) {\n" +
" return new " + shortName + "(this).position(position + i);\n" +
" return new " + shortName + "((Pointer)this).position(position + i);\n" +
" }\n";
}
}
Expand Down

0 comments on commit 20f677c

Please sign in to comment.