Commit 011c7f57 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

unix/modjni: py2jvalue: Handle both int and long java types (with TODO for long).

parent 1cb5de2c
......@@ -218,8 +218,12 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
return false;
}
} else if (type == &mp_type_int) {
CHECK_TYPE("long");
out->j = mp_obj_get_int(arg);
if (IMATCH(arg_type, "int") || IMATCH(arg_type, "long")) {
// TODO: Java long is 64-bit actually
out->j = mp_obj_get_int(arg);
} else {
return false;
}
} else {
nlr_raise(mp_obj_new_exception_msg_varg(&mp_type_TypeError, "arg type not supported"));
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment