diff options
author | Damien George <damien.p.george@gmail.com> | 2014-04-05 22:36:42 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-04-05 22:36:42 +0100 |
commit | 7efc5b3f346869cd4177760e6a6b2bb863b425da (patch) | |
tree | 04fbe840f20ab84bee79d28882601812279c8718 /py/runtime.h | |
parent | 8b0535e23fb1c646103a060a4ae17e9ee6d5e887 (diff) |
py: Make globals and locals proper dictionary objects.
Finishes addressing issue #424.
In the end this was a very neat refactor that now makes things a lot
more consistent across the py code base. It allowed some
simplifications in certain places, now that everything is a dict object.
Also converted builtins tables to dictionaries. This will be useful
when we need to turn builtins into a proper module.
Diffstat (limited to 'py/runtime.h')
-rw-r--r-- | py/runtime.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/py/runtime.h b/py/runtime.h index 6b3ab73d8..a627fa509 100644 --- a/py/runtime.h +++ b/py/runtime.h @@ -9,10 +9,10 @@ void mp_deinit(void); void mp_check_nargs(int n_args, machine_uint_t n_args_min, machine_uint_t n_args_max, int n_kw, bool is_kw); -mp_map_t *mp_locals_get(void); -void mp_locals_set(mp_map_t *m); -mp_map_t *mp_globals_get(void); -void mp_globals_set(mp_map_t *m); +mp_obj_dict_t *mp_locals_get(void); +void mp_locals_set(mp_obj_dict_t *d); +mp_obj_dict_t *mp_globals_get(void); +void mp_globals_set(mp_obj_dict_t *d); mp_obj_t mp_load_name(qstr qstr); mp_obj_t mp_load_global(qstr qstr); |