- sanitize stream filter
[m6w6/ext-http] / phpstr / phpstr.c
index c0d9543f3d3e4a7e5b11b9d20b3aee68f3632c04..5a153dbcbc00b3bb6b56fae42ed69cd2cfd0918a 100644 (file)
@@ -229,6 +229,12 @@ PHPSTR_API int phpstr_cmp(phpstr *left, phpstr *right)
        }
 }
 
+PHPSTR_API void phpstr_reset(phpstr *buf)
+{
+       buf->free += buf->used;
+       buf->used = 0;
+}
+
 PHPSTR_API void phpstr_dtor(phpstr *buf)
 {
        STR_SET(buf->data, NULL);