unix/modjni: Return any object type value as a jobject.
This commit is contained in:
parent
5167332131
commit
b230a86d33
@ -237,14 +237,22 @@ ret_string:;
|
|||||||
ret = mp_obj_new_str(s, strlen(s), false);
|
ret = mp_obj_new_str(s, strlen(s), false);
|
||||||
JJ(ReleaseStringUTFChars, arg, s);
|
JJ(ReleaseStringUTFChars, arg, s);
|
||||||
return ret;
|
return ret;
|
||||||
} else if (MATCH(jtypesig, "java.lang.Object")) {
|
} else {
|
||||||
if (JJ(IsInstanceOf, arg, String_class)) {
|
while (*jtypesig != ' ' && *jtypesig) {
|
||||||
goto ret_string;
|
if (*jtypesig == '.') {
|
||||||
} else {
|
// Non-primitive, object type
|
||||||
return new_jobject(arg);
|
if (JJ(IsInstanceOf, arg, String_class)) {
|
||||||
|
goto ret_string;
|
||||||
|
} else {
|
||||||
|
return new_jobject(arg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
jtypesig++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
printf("Unknown return type: %s\n", jtypesig);
|
||||||
|
|
||||||
return MP_OBJ_NULL;
|
return MP_OBJ_NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user