diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-15 07:28:19 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-05-15 07:28:19 +0300 |
commit | a47b64ae2dd81e45da082c6337aaf5fcef4da75c (patch) | |
tree | 48912484589ae106bedbcd17f463fdc802cc8744 /py/objstr.h | |
parent | 0c124c3123a6c7607375e2df0c49edef577a8b8d (diff) | |
download | micropython-a47b64ae2dd81e45da082c6337aaf5fcef4da75c.tar.gz micropython-a47b64ae2dd81e45da082c6337aaf5fcef4da75c.zip |
objstringio: Implement io.BytesIO.
Done in generalized manner, allowing any stream class to be specified as
working with bytes.
Diffstat (limited to 'py/objstr.h')
-rw-r--r-- | py/objstr.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/py/objstr.h b/py/objstr.h index 019f56f7b3..c0ef701a83 100644 --- a/py/objstr.h +++ b/py/objstr.h @@ -36,3 +36,4 @@ typedef struct _mp_obj_str_t { #define MP_DEFINE_STR_OBJ(obj_name, str) mp_obj_str_t obj_name = {{&mp_type_str}, 0, sizeof(str) - 1, (const byte*)str}; mp_obj_t mp_obj_str_format(uint n_args, const mp_obj_t *args); +mp_obj_t str_new(const mp_obj_type_t *type, const byte* data, uint len); |