diff --git a/CHANGELOG.md b/CHANGELOG.md
index 0031dea9..7c615fe6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,4 +1,5 @@
+### March 8, 2021 version 1.5.5
* Ensure `System.gc()` never gets called with "org.bytedeco.javacpp.nopointergc" ([issue tensorflow/java#208](https://github.com/tensorflow/java/issues/208))
* Add `Info.immutable` to disable generating setters for public data members ([pull #461](https://github.com/bytedeco/javacpp/pull/461))
* Map `String` to `char*` with `Charset.forName(STRING_BYTES_CHARSET)` when that macro is defined ([pull #460](https://github.com/bytedeco/javacpp/pull/460))
diff --git a/README.md b/README.md
index 9e6f9b02..658cb1c1 100644
--- a/README.md
+++ b/README.md
@@ -26,27 +26,27 @@ We can also have everything downloaded and installed automatically with:
org.bytedeco
javacpp
- 1.5.4
+ 1.5.5
```
* Gradle (inside the `build.gradle` file)
```groovy
dependencies {
- implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.4'
+ implementation group: 'org.bytedeco', name: 'javacpp', version: '1.5.5'
}
```
* Leiningen (inside the `project.clj` file)
```clojure
:dependencies [
- [org.bytedeco/javacpp "1.5.4"]
+ [org.bytedeco/javacpp "1.5.5"]
]
```
* sbt (inside the `build.sbt` file)
```scala
- libraryDependencies += "org.bytedeco" % "javacpp" % "1.5.4"
+ libraryDependencies += "org.bytedeco" % "javacpp" % "1.5.5"
```
Another option available to Gradle users is [Gradle JavaCPP](https://github.com/bytedeco/gradle-javacpp), and similarly for Scala users there is [SBT-JavaCPP](https://github.com/bytedeco/sbt-javacpp).
diff --git a/platform/pom.xml b/platform/pom.xml
index 4b40e996..9d7fe568 100644
--- a/platform/pom.xml
+++ b/platform/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.bytedeco
javacpp-platform
- 1.5.5-SNAPSHOT
+ 1.5.5
JavaCPP Platform
The missing bridge between Java and native C++
diff --git a/pom.xml b/pom.xml
index d3050e0f..3aa1d857 100644
--- a/pom.xml
+++ b/pom.xml
@@ -4,7 +4,7 @@
4.0.0
org.bytedeco
javacpp
- 1.5.5-SNAPSHOT
+ 1.5.5
JavaCPP
The missing bridge between Java and native C++
diff --git a/src/main/java/org/bytedeco/javacpp/ClassProperties.java b/src/main/java/org/bytedeco/javacpp/ClassProperties.java
index 552db195..96f614e7 100644
--- a/src/main/java/org/bytedeco/javacpp/ClassProperties.java
+++ b/src/main/java/org/bytedeco/javacpp/ClassProperties.java
@@ -111,11 +111,9 @@ public void addAll(String key, Collection values) {
new File(root + value).exists()) {
value = root + value;
}
- if (values2.contains(value)) {
- // remove existing values to allow overriding them
- values2.remove(value);
+ if (!values2.contains(value)) {
+ values2.add(value);
}
- values2.add(value);
}
}
}
diff --git a/src/main/java/org/bytedeco/javacpp/tools/Generator.java b/src/main/java/org/bytedeco/javacpp/tools/Generator.java
index c6708234..6bfa6528 100644
--- a/src/main/java/org/bytedeco/javacpp/tools/Generator.java
+++ b/src/main/java/org/bytedeco/javacpp/tools/Generator.java
@@ -2364,6 +2364,12 @@ String returnBefore(MethodInformation methodInfo) {
}
}
} else if (methodInfo.returnType == String.class) {
+ if (returnBy instanceof ByPtrPtr) {
+ typeName[0] = valueTypeName;
+ }
+ if (!typeName[0].startsWith("const ")) {
+ typeName[0] = "const " + typeName[0];
+ }
out.println(" jstring rarg = NULL;");
out.println(" " + typeName[0] + " rptr;");
if (returnBy instanceof ByRef) {
@@ -3179,6 +3185,12 @@ void callback(Class> cls, Method callbackMethod, String callbackName, int allo
out.println(" args[" + j + "].l = obj" + j + ";");
} else if (callbackParameterTypes[j] == String.class) {
passesStrings = true;
+ if (passBy instanceof ByPtrPtr) {
+ typeName[0] = valueTypeName;
+ }
+ if (!typeName[0].startsWith("const ")) {
+ typeName[0] = "const " + typeName[0];
+ }
if (adapterInfo != null) {
final String adapter = "adapter" + j;
out.println(" jstring obj" + j + " = " + createString("(" + typeName[0] + ") " + adapter, adapter, callbackParameterAnnotations[j]));