unix/modjni: Return Java null as Python None.

This commit is contained in:
Paul Sokolovsky 2015-09-14 00:15:08 +03:00
parent 7a4b10cc4c
commit 5167332131
1 changed files with 1 additions and 1 deletions

View File

@ -227,7 +227,7 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
#define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1)) #define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1))
STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) { STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) {
mp_obj_t ret; mp_obj_t ret;
if (MATCH(jtypesig, "void")) { if (arg == NULL || MATCH(jtypesig, "void")) {
return mp_const_none; return mp_const_none;
} else if (MATCH(jtypesig, "int")) { } else if (MATCH(jtypesig, "int")) {
return mp_obj_new_int((mp_int_t)arg); return mp_obj_new_int((mp_int_t)arg);