Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
M
micropython
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
card10
micropython
Commits
b5cef5c7
Commit
b5cef5c7
authored
May 9, 2015
by
Kaspar Schleiser
Committed by
Damien George
May 17, 2015
Browse files
Options
Downloads
Patches
Plain Diff
py/objobject: Don't make locals_dict if there's nothing to go in it.
parent
cf5112b2
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
py/objobject.c
+3
-1
3 additions, 1 deletion
py/objobject.c
with
3 additions
and
1 deletion
py/objobject.c
+
3
−
1
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
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment