Properly escape '_' in native method stubs.

This commit is contained in:
Ioannis Tsakpinis 2013-01-01 18:12:53 +02:00
parent 76ba12ad38
commit 517d6cfb3b
1 changed files with 4 additions and 0 deletions

View File

@ -233,6 +233,10 @@ public class Utils {
}
public static String getQualifiedNativeMethodName(String qualified_class_name, String method_name) {
// Escape '_' in method name
if ( method_name.indexOf('_') != -1 )
method_name = method_name.replace("_", "_1");
return "Java_" + getNativeQualifiedName(qualified_class_name) + "_" + method_name;
}