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
b5cef5c7
Commit
b5cef5c7
authored
May 09, 2015
by
Kaspar Schleiser
Committed by
Damien George
May 17, 2015
Browse files
py/objobject: Don't make locals_dict if there's nothing to go in it.
parent
cf5112b2
Changes
1
Show whitespace changes
Inline
Side-by-side
py/objobject.c
View file @
b5cef5c7
...
...
@@ -59,7 +59,6 @@ STATIC mp_obj_t object___new__(mp_obj_t cls) {
}
STATIC
MP_DEFINE_CONST_FUN_OBJ_1
(
object___new___fun_obj
,
object___new__
);
STATIC
MP_DEFINE_CONST_STATICMETHOD_OBJ
(
object___new___obj
,
(
const
mp_obj_t
)
&
object___new___fun_obj
);
#endif
STATIC
const
mp_map_elem_t
object_locals_dict_table
[]
=
{
#if MICROPY_CPYTHON_COMPAT
...
...
@@ -71,10 +70,13 @@ STATIC const mp_map_elem_t object_locals_dict_table[] = {
};
STATIC
MP_DEFINE_CONST_DICT
(
object_locals_dict
,
object_locals_dict_table
);
#endif
const
mp_obj_type_t
mp_type_object
=
{
{
&
mp_type_type
},
.
name
=
MP_QSTR_object
,
.
make_new
=
object_make_new
,
#if MICROPY_CPYTHON_COMPAT
.
locals_dict
=
(
mp_obj_t
)
&
object_locals_dict
,
#endif
};
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