diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-20 20:32:50 +0200 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-01-20 20:37:01 +0200 |
commit | a80ff04fe7458b8ed8e948619b3700b720832ec2 (patch) | |
tree | 8f78e879e523c609c36475bf14bde8043c2719fb /py/runtime.c | |
parent | f0cfb8cb45cb1fc91c77fae98f5452b7f7865392 (diff) | |
download | micropython-a80ff04fe7458b8ed8e948619b3700b720832ec2.tar.gz micropython-a80ff04fe7458b8ed8e948619b3700b720832ec2.zip |
Add dummy bytes() constructor.
Currently, MicroPython strings are mix between CPython byte and unicode
strings. So, conversion is null so far. This dummy implementation is
intended for compatibility with CPython (so, same code can run on both).
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 d8fc3ff6e4..72347aff80 100644 --- a/py/runtime.c +++ b/py/runtime.c @@ -130,6 +130,7 @@ void rt_init(void) { mp_map_add_qstr(&map_builtins, MP_QSTR_abs, (mp_obj_t)&mp_builtin_abs_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_all, (mp_obj_t)&mp_builtin_all_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_any, (mp_obj_t)&mp_builtin_any_obj); + mp_map_add_qstr(&map_builtins, MP_QSTR_bytes, (mp_obj_t)&mp_builtin_bytes_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_callable, (mp_obj_t)&mp_builtin_callable_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_chr, (mp_obj_t)&mp_builtin_chr_obj); mp_map_add_qstr(&map_builtins, MP_QSTR_divmod, (mp_obj_t)&mp_builtin_divmod_obj); |