Skip to content

Commit

Permalink
Change header file naming to match methods (#58)
Browse files Browse the repository at this point in the history
  • Loading branch information
pomadchin authored Jul 27, 2021
1 parent d655cb5 commit 39cf110
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 7 deletions.
2 changes: 0 additions & 2 deletions plugin/src/main/java/com/github/sbt/jni/javah/util/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,6 @@ public static String mangleName(String name) {
char ch = name.charAt(i);
if (ch == '.') {
builder.append('_');
} else if (ch == '$') {
builder.append("__");
} else if (ch == '_') {
builder.append("_1");
} else if (ch == ';') {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#include <jni.h>
#include "multiclasses_Adder.h"
#include "multiclasses_Adder__.h"
#include "multiclasses_Adder_00024.h"

/*
* Class: multiclasses_Adder
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/sbt-test/sbt-jni/oneproject/test
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
> +javah
$ exists src/native/include/simple_Library__.h
$ exists src/native/include/simple_Library_00024.h
> nativeInit cmake demo
> +run
2 changes: 1 addition & 1 deletion plugin/src/sbt-test/sbt-jni/simple-syntax/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> +javah
$ exists native/src/include/simple_Library__.h
$ exists native/src/include/simple_Library_00024.h
> nativeInit cmake demo
> +test
> +core/run
2 changes: 1 addition & 1 deletion plugin/src/sbt-test/sbt-jni/simple/native/src/library.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <stdio.h>
#include "simple_Library__.h"
#include "simple_Library_00024.h"

/*
* Class: simple_Library__
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/sbt-test/sbt-jni/simple/test
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
> +javah
$ exists native/src/include/simple_Library__.h
$ exists native/src/include/simple_Library_00024.h
> nativeInit cmake demo
> +test
> +core/run

0 comments on commit 39cf110

Please sign in to comment.