diff options
author | Gerd Hoffmann <kraxel@redhat.com> | 2015-10-30 12:09:59 +0100 |
---|---|---|
committer | Gerd Hoffmann <kraxel@redhat.com> | 2015-11-05 09:08:39 +0100 |
commit | 830a9583206a051c240b74c3f688a015dc5d2967 (patch) | |
tree | 83bdc81fb50daf35dbfed83761fa232a1108eddf /include/qemu | |
parent | 4d1eb5fdb141c9100eb82e1dc7d4547fb1decd8b (diff) | |
download | qemu-830a9583206a051c240b74c3f688a015dc5d2967.zip qemu-830a9583206a051c240b74c3f688a015dc5d2967.tar.gz qemu-830a9583206a051c240b74c3f688a015dc5d2967.tar.bz2 |
buffer: add buffer_move
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Peter Lieven <pl@kamp.de>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Message-id: 1446203414-4013-5-git-send-email-kraxel@redhat.com
Diffstat (limited to 'include/qemu')
-rw-r--r-- | include/qemu/buffer.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/include/qemu/buffer.h b/include/qemu/buffer.h index f53ee9e..1358df1 100644 --- a/include/qemu/buffer.h +++ b/include/qemu/buffer.h @@ -137,4 +137,14 @@ gboolean buffer_empty(Buffer *buffer); */ void buffer_move_empty(Buffer *to, Buffer *from); +/** + * buffer_move: + * @to: destination buffer object + * @from: source buffer object + * + * Moves buffer, copying data (unless 'to' buffer happens to be empty). + * 'from' buffer is empty and zero-sized on return. + */ +void buffer_move(Buffer *to, Buffer *from); + #endif /* QEMU_BUFFER_H__ */ |