allow null Strings to pass thru
This commit is contained in:
parent
3c82da72c2
commit
0e48e92124
@ -1347,8 +1347,8 @@ while (my($name, $fields) = each %classes) {
|
||||
$args_proto = ", jstring jname";
|
||||
$arg_type = 'const char *';
|
||||
$decl_string = "const char *name;";
|
||||
$get_string = "name = JENV->GetStringUTFChars(env, jname, 0);";
|
||||
$release_string = "JENV->ReleaseStringUTFChars(env, jname, name);";
|
||||
$get_string = "name = jname ? JENV->GetStringUTFChars(env, jname, 0) : NULL;";
|
||||
$release_string = "if (jname) JENV->ReleaseStringUTFChars(env, jname, name);";
|
||||
$arg = 'name';
|
||||
$args = " $arg, ";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user