Browse Source

fix integer getField, get the primitive int instead of Integer object.

JNI-76
Hussein Kasem 7 years ago
parent
commit
3e98265ae1
  1. 13
      src/gen_cpp_Engine.ysl2

13
src/gen_cpp_Engine.ysl2

@ -107,10 +107,19 @@ tstylesheet {
const "name", "name(*[3])"; const "name", "name(*[3])";
const "sig" call "toSig" with "type", "$type"; const "sig" call "toSig" with "type", "$type";
choose {
when "$type='int'"
|| ||
jfieldID «$name»_field = getFieldID(env, "«$jtype»", jfieldID «$name»_field = env->GetFieldID(clazz_result_, "«$name»", "I");
"«$name»", "«$sig»"); ||
otherwise {
|| ||
jfieldID «$name»_field = getFieldID(env, "«$jtype»", "«$name»", "«$sig»");
||
}
}
choose { choose {
when "$type='int'" when "$type='int'"

Loading…
Cancel
Save