diff options
| author | Ray Strode <rstrode@redhat.com> | 2008-05-27 14:24:58 -0400 |
|---|---|---|
| committer | Ray Strode <rstrode@redhat.com> | 2008-05-28 09:25:27 -0400 |
| commit | 1a66267ef5a86196a2480af383013f6d3c4a5bc7 (patch) | |
| tree | 3697730092d1db9ad5e2bb5a03f91d1896e96155 /src/libply/ply-buffer.h | |
| parent | 73c9fc687f3437574311b338e24d0613c077b7da (diff) | |
| download | plymouth-1a66267ef5a86196a2480af383013f6d3c4a5bc7.tar.gz plymouth-1a66267ef5a86196a2480af383013f6d3c4a5bc7.tar.xz plymouth-1a66267ef5a86196a2480af383013f6d3c4a5bc7.zip | |
Add new ply_buffer_steal_bytes method
This function disowns the bytes in the buffer and returns
them to the caller. It's useful for freeing the buffer, but
keeping the bytes around without doing a copy.
Diffstat (limited to 'src/libply/ply-buffer.h')
| -rw-r--r-- | src/libply/ply-buffer.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libply/ply-buffer.h b/src/libply/ply-buffer.h index 38dc9c1..cfda236 100644 --- a/src/libply/ply-buffer.h +++ b/src/libply/ply-buffer.h @@ -48,6 +48,7 @@ void ply_buffer_remove_bytes (ply_buffer_t *buffer, void ply_buffer_remove_bytes_at_end (ply_buffer_t *buffer, size_t number_of_bytes); const char *ply_buffer_get_bytes (ply_buffer_t *buffer); +char *ply_buffer_steal_bytes (ply_buffer_t *buffer); size_t ply_buffer_get_size (ply_buffer_t *buffer); void ply_buffer_clear (ply_buffer_t *buffer); #endif |
