From a47b64ae2dd81e45da082c6337aaf5fcef4da75c Mon Sep 17 00:00:00 2001 From: Paul Sokolovsky Date: Thu, 15 May 2014 07:28:19 +0300 Subject: objstringio: Implement io.BytesIO. Done in generalized manner, allowing any stream class to be specified as working with bytes. --- py/objstr.h | 1 + 1 file changed, 1 insertion(+) (limited to 'py/objstr.h') diff --git a/py/objstr.h b/py/objstr.h index 019f56f7b..c0ef701a8 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); -- cgit v1.2.3