summaryrefslogtreecommitdiffstatshomepage
path: root/py/misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'py/misc.h')
-rw-r--r--py/misc.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/py/misc.h b/py/misc.h
index 79a4c1c6ef..3ed227a352 100644
--- a/py/misc.h
+++ b/py/misc.h
@@ -139,7 +139,6 @@ typedef struct _vstr_t {
size_t alloc;
size_t len;
char *buf;
- bool had_error : 1;
bool fixed_buf : 1;
} vstr_t;
@@ -155,10 +154,9 @@ void vstr_clear(vstr_t *vstr);
vstr_t *vstr_new(void);
vstr_t *vstr_new_size(size_t 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);
-size_t vstr_len(vstr_t *vstr);
+static inline void vstr_reset(vstr_t *vstr) { vstr->len = 0; }
+static inline char *vstr_str(vstr_t *vstr) { return vstr->buf; }
+static inline size_t vstr_len(vstr_t *vstr) { return vstr->len; }
void vstr_hint_size(vstr_t *vstr, size_t size);
char *vstr_extend(vstr_t *vstr, size_t size);
char *vstr_add_len(vstr_t *vstr, size_t len);