Skip to content

Commit

Permalink
Add name mangling rule for '$'
Browse files Browse the repository at this point in the history
Scala uses '$' suffixes in generated classes extensively.
  • Loading branch information
jodersky committed Dec 13, 2019
1 parent 06e241a commit 12b4bc7
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions plugin/src/main/java/ch/jodersky/sbt/jni/javah/Utils.java
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ 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

0 comments on commit 12b4bc7

Please sign in to comment.