Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
TASTE
uPython-mirror
Commits
31c1f130
Commit
31c1f130
authored
Jan 25, 2015
by
Paul Sokolovsky
Browse files
modffi: 's' (string) return type: handle NULL properly (return None).
parent
32444b75
Changes
1
Hide whitespace changes
Inline
Side-by-side
unix/modffi.c
View file @
31c1f130
...
...
@@ -140,6 +140,9 @@ STATIC mp_obj_t return_ffi_value(ffi_arg val, char type)
switch
(
type
)
{
case
's'
:
{
const
char
*
s
=
(
const
char
*
)
val
;
if
(
!
s
)
{
return
mp_const_none
;
}
return
mp_obj_new_str
(
s
,
strlen
(
s
),
false
);
}
case
'v'
:
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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