aboutsummaryrefslogtreecommitdiff
path: root/include/qemu
diff options
context:
space:
mode:
authorGerd Hoffmann <kraxel@redhat.com>2015-10-30 12:09:58 +0100
committerGerd Hoffmann <kraxel@redhat.com>2015-11-05 09:08:36 +0100
commit4d1eb5fdb141c9100eb82e1dc7d4547fb1decd8b (patch)
treef226b0238319ab57fb4f6889682ffb5dce5a3e22 /include/qemu
parent810082d15c244b8b29470d3bb1c6b11fc9a40c25 (diff)
downloadqemu-4d1eb5fdb141c9100eb82e1dc7d4547fb1decd8b.zip
qemu-4d1eb5fdb141c9100eb82e1dc7d4547fb1decd8b.tar.gz
qemu-4d1eb5fdb141c9100eb82e1dc7d4547fb1decd8b.tar.bz2
buffer: add buffer_move_empty
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Peter Lieven <pl@kamp.de> Reviewed-by: Daniel Berrange <berrange@redhat.com> Message-id: 1446203414-4013-4-git-send-email-kraxel@redhat.com
Diffstat (limited to 'include/qemu')
-rw-r--r--include/qemu/buffer.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/buffer.h b/include/qemu/buffer.h
index 0710e16..f53ee9e 100644
--- a/include/qemu/buffer.h
+++ b/include/qemu/buffer.h
@@ -127,4 +127,14 @@ uint8_t *buffer_end(Buffer *buffer);
*/
gboolean buffer_empty(Buffer *buffer);
+/**
+ * buffer_move_empty:
+ * @to: destination buffer object
+ * @from: source buffer object
+ *
+ * Moves buffer, without copying data. 'to' buffer must be empty.
+ * 'from' buffer is empty and zero-sized on return.
+ */
+void buffer_move_empty(Buffer *to, Buffer *from);
+
#endif /* QEMU_BUFFER_H__ */