Skip to content

Commit

Permalink
Release version 1.5.5
Browse files Browse the repository at this point in the history
  • Loading branch information
saudet committed Mar 8, 2021
1 parent c1520a0 commit 66738d6
Show file tree
Hide file tree
Showing 6 changed files with 21 additions and 10 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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))
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ We can also have everything downloaded and installed automatically with:
<dependency>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.4</version>
<version>1.5.5</version>
</dependency>
```

* 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).
Expand Down
2 changes: 1 addition & 1 deletion platform/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp-platform</artifactId>
<version>1.5.5-SNAPSHOT</version>
<version>1.5.5</version>

<name>JavaCPP Platform</name>
<description>The missing bridge between Java and native C++</description>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.bytedeco</groupId>
<artifactId>javacpp</artifactId>
<version>1.5.5-SNAPSHOT</version>
<version>1.5.5</version>

<name>JavaCPP</name>
<description>The missing bridge between Java and native C++</description>
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/org/bytedeco/javacpp/ClassProperties.java
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,9 @@ public void addAll(String key, Collection<String> 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);
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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]));
Expand Down

0 comments on commit 66738d6

Please sign in to comment.