From 5167332131e7fdf5cb3826e938178f072b5c5354 Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Mon, 14 Sep 2015 00:15:08 +0300 Subject: [PATCH] unix/modjni: Return Java null as Python None. --- unix/modjni.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/unix/modjni.c b/unix/modjni.c index 2aee36998b..542dfb8993 100644 --- a/unix/modjni.c +++ b/unix/modjni.c @@ -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)) STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) { mp_obj_t ret; - if (MATCH(jtypesig, "void")) { + if (arg == NULL || MATCH(jtypesig, "void")) { return mp_const_none; } else if (MATCH(jtypesig, "int")) { return mp_obj_new_int((mp_int_t)arg);