diff options
author | Damien George <damien.p.george@gmail.com> | 2014-01-02 16:01:17 +0000 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2014-01-02 16:01:17 +0000 |
commit | 40563d56bdabf270f0f2296dcc1b2f64b0c238c0 (patch) | |
tree | dc10ac2c6b010d3967cc5c1e07c60f5056f4ec16 /py/runtime.c | |
parent | 210a02e1051d9f5b6f03c24714ab86ac936bc41d (diff) | |
download | micropython-40563d56bdabf270f0f2296dcc1b2f64b0c238c0.tar.gz micropython-40563d56bdabf270f0f2296dcc1b2f64b0c238c0.zip |
py: Add framework for built-in "type()" function.
Diffstat (limited to 'py/runtime.c')
-rw-r--r-- | py/runtime.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/runtime.c b/py/runtime.c index 372cdd8656..c3b3d74259 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -147,6 +147,7 @@ void rt_init(void) { mp_qstr_map_lookup(&map_builtins, qstr_from_str_static("range"), true)->value = rt_make_function_var(1, mp_builtin_range); mp_qstr_map_lookup(&map_builtins, qstr_from_str_static("set"), true)->value = (mp_obj_t)&mp_builtin_set_obj; mp_qstr_map_lookup(&map_builtins, qstr_from_str_static("sum"), true)->value = rt_make_function_var(1, mp_builtin_sum); + mp_qstr_map_lookup(&map_builtins, qstr_from_str_static("type"), true)->value = (mp_obj_t)&mp_builtin_type_obj; next_unique_code_id = 2; // 1 is reserved for the __main__ module scope |