diff options
author | Marc-André Lureau <marcandre.lureau@redhat.com> | 2020-01-10 19:30:22 +0400 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2020-01-24 20:59:13 +0100 |
commit | 164c374b75f87c6765a705c4418ab7005a2d356f (patch) | |
tree | a22061845f7977c11c73fd95977b928e96c30a9b /include/qapi | |
parent | a3a162113e95ab19ad52c503c157287ca2570c07 (diff) |
qstring: add qstring_free()
Similar to g_string_free(), optionally return the underlying char*.
Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
Message-Id: <20200110153039.1379601-10-marcandre.lureau@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/qapi')
-rw-r--r-- | include/qapi/qmp/qstring.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/qapi/qmp/qstring.h b/include/qapi/qmp/qstring.h index 3e83e3a95d..e2e356e5e7 100644 --- a/include/qapi/qmp/qstring.h +++ b/include/qapi/qmp/qstring.h @@ -33,6 +33,7 @@ void qstring_append_int(QString *qstring, int64_t value); void qstring_append(QString *qstring, const char *str); void qstring_append_chr(QString *qstring, int c); bool qstring_is_equal(const QObject *x, const QObject *y); +char *qstring_free(QString *qstring, bool return_str); void qstring_destroy_obj(QObject *obj); #endif /* QSTRING_H */ |