mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-08 18:23:57 -06:00
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
This commit is contained in:
parent
810082d15c
commit
4d1eb5fdb1
2 changed files with 24 additions and 0 deletions
|
@ -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__ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue