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
3aa09f57
Commit
3aa09f57
authored
Oct 23, 2014
by
Damien George
Browse files
py: Use MP_OBJ_NULL instead of NULL in a few places.
parent
37378f8a
Changes
3
Hide whitespace changes
Inline
Side-by-side
py/objstr.c
View file @
3aa09f57
...
...
@@ -215,7 +215,7 @@ STATIC mp_obj_t bytes_make_new(mp_obj_t type_in, mp_uint_t n_args, mp_uint_t n_k
mp_int_t
len
;
byte
*
data
;
vstr_t
*
vstr
=
NULL
;
mp_obj_t
o
=
NULL
;
mp_obj_t
o
=
MP_OBJ_
NULL
;
// Try to create array of exact len if initializer len is known
mp_obj_t
len_in
=
mp_obj_len_maybe
(
args
[
0
]);
if
(
len_in
==
MP_OBJ_NULL
)
{
...
...
py/objtype.c
View file @
3aa09f57
...
...
@@ -292,7 +292,7 @@ mp_obj_t instance_make_new(mp_obj_t self_in, mp_uint_t n_args, mp_uint_t n_kw, c
o
=
new_ret
;
// now call Python class __init__ function with all args
init_fn
[
0
]
=
init_fn
[
1
]
=
NULL
;
init_fn
[
0
]
=
init_fn
[
1
]
=
MP_OBJ_
NULL
;
lookup
.
obj
=
o
;
lookup
.
attr
=
MP_QSTR___init__
;
lookup
.
meth_offset
=
0
;
...
...
py/runtime.c
View file @
3aa09f57
...
...
@@ -475,8 +475,8 @@ mp_obj_t mp_binary_op(mp_uint_t op, mp_obj_t lhs, mp_obj_t rhs) {
}
if
(
type
->
getiter
!=
NULL
)
{
/* second attempt, walk the iterator */
mp_obj_t
next
=
NULL
;
mp_obj_t
iter
=
mp_getiter
(
rhs
);
mp_obj_t
next
;
while
((
next
=
mp_iternext
(
iter
))
!=
MP_OBJ_STOP_ITERATION
)
{
if
(
mp_obj_equal
(
next
,
lhs
))
{
return
mp_const_true
;
...
...
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