diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-09-14 00:15:08 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-09-14 00:15:35 +0300 |
commit | 5167332131e7fdf5cb3826e938178f072b5c5354 (patch) | |
tree | 38c1fc2dbfc2ee85bd25b7135ccd1c7ca0e7674d /unix/modjni.c | |
parent | 7a4b10cc4ced3aa5562841536be897c0701012dc (diff) | |
download | micropython-5167332131e7fdf5cb3826e938178f072b5c5354.tar.gz micropython-5167332131e7fdf5cb3826e938178f072b5c5354.zip |
unix/modjni: Return Java null as Python None.
Diffstat (limited to 'unix/modjni.c')
-rw-r--r-- | unix/modjni.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |