Commit c502f536 authored by Poul-Henning Kamp's avatar Poul-Henning Kamp Committed by Lasse Karstensen

Add VSB_destroy(). It's like VSB_delete() but it NULL's the pointer.

parent 0947220b
......@@ -75,6 +75,7 @@ int VSB_finish(struct vsb *);
char *VSB_data(const struct vsb *);
ssize_t VSB_len(const struct vsb *);
void VSB_delete(struct vsb *);
void VSB_destroy(struct vsb **);
#define VSB_QUOTE_NONL 1
void VSB_quote(struct vsb *s, const char *p, int len, int how);
void VSB_indent(struct vsb *, int);
......
......@@ -489,6 +489,13 @@ VSB_delete(struct vsb *s)
SBFREE(s);
}
void
VSB_destroy(struct vsb **s)
{
VSB_delete(*s);
*s = NULL;
}
/*
* Quote a string
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment