Skip to content

Commit

Permalink
* Fix potential compile errors with Android caused by superfluous `t…
Browse files Browse the repository at this point in the history
…ypedef` from `Generator` (issue #186)
  • Loading branch information
saudet committed Jun 7, 2017
1 parent 3563847 commit d570d7b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@

* Fix potential compile errors with Android caused by superfluous `typedef` from `Generator` ([issue #186](https://github.com/bytedeco/javacpp/issues/186))
* Fix `Parser` translation of strings containing the "::" subsequence ([issue #184](https://github.com/bytedeco/javacpp/issues/184))
* Prevent `Parser` from overwriting target classes when nothing was parsed
* Fix `Parser` error on member variables with initializers plus `Info.skip()` ([issue #179](https://github.com/bytedeco/javacpp/issues/179))
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/bytedeco/javacpp/tools/Generator.java
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ boolean classes(boolean handleExceptions, boolean defineAdapters, boolean conver
out.println(" typedef int jint;");
out.println(" typedef long long jlong;");
out.println(" typedef signed char jbyte;");
out.println("#elif defined(__GNUC__)");
out.println("#elif defined(__GNUC__) && !defined(__ANDROID__)");
out.println(" #define _JAVASOFT_JNI_MD_H_");
out.println();
out.println(" #define JNIEXPORT __attribute__((visibility(\"default\")))");
Expand Down Expand Up @@ -572,7 +572,7 @@ boolean classes(boolean handleExceptions, boolean defineAdapters, boolean conver
out.println(" }");
out.println(" if (success) {");
out.println(" length /= sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);");
out.println(" for (int i = 0; i < length; i++) {");
out.println(" for (DWORD i = 0; i < length; i++) {");
out.println(" if (info[i].Relationship == RelationProcessorCore) {");
out.println(" total++;");
out.println(" }");
Expand Down Expand Up @@ -623,7 +623,7 @@ boolean classes(boolean handleExceptions, boolean defineAdapters, boolean conver
out.println(" }");
out.println(" if (success) {");
out.println(" length /= sizeof(SYSTEM_LOGICAL_PROCESSOR_INFORMATION);");
out.println(" for (int i = 0; i < length; i++) {");
out.println(" for (DWORD i = 0; i < length; i++) {");
out.println(" if (info[i].Relationship == RelationProcessorPackage) {");
out.println(" total++;");
out.println(" }");
Expand Down

0 comments on commit d570d7b

Please sign in to comment.