Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
7381b7ac
Commit
7381b7ac
authored
Oct 10, 2015
by
Paul Sokolovsky
Browse files
unix/modjni: py2jvalue: Support bool and None values.
parent
0e87bc7b
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/modjni.c
View file @
7381b7ac
...
...
@@ -352,6 +352,18 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
}
mp_obj_jobject_t
*
jo
=
arg
;
out
->
l
=
jo
->
obj
;
}
else
if
(
type
==
&
mp_type_bool
)
{
if
(
IMATCH
(
arg_type
,
"boolean"
))
{
out
->
z
=
arg
==
mp_const_true
;
}
else
{
return
false
;
}
}
else
if
(
arg
==
mp_const_none
)
{
//printf("TODO: Check java arg type!!\n");
while
(
isalpha
(
*
arg_type
)
||
*
arg_type
==
'.'
)
{
arg_type
++
;
}
out
->
l
=
NULL
;
}
else
{
nlr_raise
(
mp_obj_new_exception_msg_varg
(
&
mp_type_TypeError
,
"arg type not supported"
));
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment