Skip to content
Snippets Groups Projects
Commit 080d99b7 authored by Paul Sokolovsky's avatar Paul Sokolovsky
Browse files

py: Optimize locals()/globals() implementation.

parent 09af5364
No related branches found
No related tags found
No related merge requests found
...@@ -411,15 +411,6 @@ STATIC mp_obj_t mp_builtin_getattr(uint n_args, const mp_obj_t *args) { ...@@ -411,15 +411,6 @@ STATIC mp_obj_t mp_builtin_getattr(uint n_args, const mp_obj_t *args) {
MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_getattr_obj, 2, 3, mp_builtin_getattr); MP_DEFINE_CONST_FUN_OBJ_VAR_BETWEEN(mp_builtin_getattr_obj, 2, 3, mp_builtin_getattr);
// These two are defined in terms of MicroPython API functions right away
STATIC mp_obj_t mp_builtin_globals() { MP_DEFINE_CONST_FUN_OBJ_0(mp_builtin_globals_obj, mp_globals_get);
return mp_globals_get(); MP_DEFINE_CONST_FUN_OBJ_0(mp_builtin_locals_obj, mp_locals_get);
}
MP_DEFINE_CONST_FUN_OBJ_0(mp_builtin_globals_obj, mp_builtin_globals);
STATIC mp_obj_t mp_builtin_locals() {
return mp_locals_get();
}
MP_DEFINE_CONST_FUN_OBJ_0(mp_builtin_locals_obj, mp_builtin_locals);
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment