summaryrefslogtreecommitdiffstatshomepage
path: root/py/misc.h
diff options
context:
space:
mode:
authorDamien George <damien.p.george@gmail.com>2014-01-14 15:35:50 -0800
committerDamien George <damien.p.george@gmail.com>2014-01-14 15:35:50 -0800
commit11cc694aa0fced8ea96bf36d37f4409296740e1e (patch)
tree07a423804af57c95d8776efd07290fd9b96bf1ed /py/misc.h
parent39eab8de96bf81020ee449347ff0e5958bc1a332 (diff)
parent5225450b9f7116e0c2a1d4080fbc479ea4b677c7 (diff)
downloadmicropython-11cc694aa0fced8ea96bf36d37f4409296740e1e.tar.gz
micropython-11cc694aa0fced8ea96bf36d37f4409296740e1e.zip
Merge pull request #173 from pfalcon/file-readall
Generic implementation if stream readall() method, immediately reused in unix io.FileIO implementation
Diffstat (limited to 'py/misc.h')
-rw-r--r--py/misc.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/py/misc.h b/py/misc.h
index 22158c71a7..e985bc5253 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -59,15 +59,19 @@ typedef struct _vstr_t {
bool had_error;
} vstr_t;
-void vstr_init(vstr_t *vstr);
+void vstr_init(vstr_t *vstr, int alloc);
void vstr_clear(vstr_t *vstr);
vstr_t *vstr_new(void);
+vstr_t *vstr_new_size(int alloc);
void vstr_free(vstr_t *vstr);
void vstr_reset(vstr_t *vstr);
bool vstr_had_error(vstr_t *vstr);
char *vstr_str(vstr_t *vstr);
int vstr_len(vstr_t *vstr);
void vstr_hint_size(vstr_t *vstr, int size);
+char *vstr_extend(vstr_t *vstr, int size);
+bool vstr_set_size(vstr_t *vstr, int size);
+bool vstr_shrink(vstr_t *vstr);
char *vstr_add_len(vstr_t *vstr, int len);
void vstr_add_byte(vstr_t *vstr, byte v);
void vstr_add_char(vstr_t *vstr, unichar chr);