We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5167332 commit b230a86Copy full SHA for b230a86
unix/modjni.c
@@ -237,14 +237,22 @@ ret_string:;
237
ret = mp_obj_new_str(s, strlen(s), false);
238
JJ(ReleaseStringUTFChars, arg, s);
239
return ret;
240
- } else if (MATCH(jtypesig, "java.lang.Object")) {
241
- if (JJ(IsInstanceOf, arg, String_class)) {
242
- goto ret_string;
243
- } else {
244
- return new_jobject(arg);
+ } else {
+ while (*jtypesig != ' ' && *jtypesig) {
+ if (*jtypesig == '.') {
+ // Non-primitive, object type
+ if (JJ(IsInstanceOf, arg, String_class)) {
245
+ goto ret_string;
246
247
+ return new_jobject(arg);
248
+ }
249
250
+ jtypesig++;
251
}
252
253
254
+ printf("Unknown return type: %s\n", jtypesig);
255
+
256
return MP_OBJ_NULL;
257
258
0 commit comments