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
69c5fe1d
Commit
69c5fe1d
authored
Aug 12, 2014
by
Damien George
Browse files
py: Make a function static; replace NULL with MP_OBJ_NULL.
parent
2eb1f604
Changes
1
Hide whitespace changes
Inline
Side-by-side
py/builtin.c
View file @
69c5fe1d
...
...
@@ -99,7 +99,7 @@ STATIC mp_obj_t mp_builtin___repl_print__(mp_obj_t o) {
MP_DEFINE_CONST_FUN_OBJ_1
(
mp_builtin___repl_print___obj
,
mp_builtin___repl_print__
);
mp_obj_t
mp_builtin_abs
(
mp_obj_t
o_in
)
{
STATIC
mp_obj_t
mp_builtin_abs
(
mp_obj_t
o_in
)
{
if
(
MP_OBJ_IS_SMALL_INT
(
o_in
))
{
mp_int_t
val
=
MP_OBJ_SMALL_INT_VALUE
(
o_in
);
if
(
val
<
0
)
{
...
...
@@ -286,7 +286,7 @@ MP_DEFINE_CONST_FUN_OBJ_1(mp_builtin_iter_obj, mp_builtin_iter);
STATIC
mp_obj_t
mp_builtin_len
(
mp_obj_t
o_in
)
{
mp_obj_t
len
=
mp_obj_len_maybe
(
o_in
);
if
(
len
==
NULL
)
{
if
(
len
==
MP_OBJ_
NULL
)
{
nlr_raise
(
mp_obj_new_exception_msg_varg
(
&
mp_type_TypeError
,
"object of type '%s' has no len()"
,
mp_obj_get_type_str
(
o_in
)));
}
else
{
return
len
;
...
...
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