diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-07-06 14:39:15 +0200 |
---|---|---|
committer | Marc-André Lureau <marcandre.lureau@gmail.com> | 2012-03-20 15:25:47 +0100 |
commit | 8f568a4073bd423b8ae7e5a8d102e4c4db811abd (patch) | |
tree | 6a9e001482a82f9d7fec65667aa39d5aa7880dfc /common/mem.h | |
parent | 09d9a18702a48e83ec9b2c6f7c2cd47e6a5b87a1 (diff) | |
download | spice-common-8f568a4073bd423b8ae7e5a8d102e4c4db811abd.tar.gz spice-common-8f568a4073bd423b8ae7e5a8d102e4c4db811abd.tar.xz spice-common-8f568a4073bd423b8ae7e5a8d102e4c4db811abd.zip |
Add spice_chunks_* helpers
Diffstat (limited to 'common/mem.h')
-rw-r--r-- | common/mem.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/common/mem.h b/common/mem.h index 9b257ad..ebf2fb8 100644 --- a/common/mem.h +++ b/common/mem.h @@ -21,6 +21,7 @@ #include <stdlib.h> #include <spice/macros.h> +#include <spice/draw.h> /* for SpiceChunks, temporary */ char *spice_strdup(const char *str) SPICE_GNUC_MALLOC; char *spice_strndup(const char *str, size_t n_bytes) SPICE_GNUC_MALLOC; @@ -32,6 +33,10 @@ void *spice_malloc_n(size_t n_blocks, size_t n_block_bytes) SPICE_GNUC_MALLOC SP void *spice_malloc_n_m(size_t n_blocks, size_t n_block_bytes, size_t extra_size) SPICE_GNUC_MALLOC; void *spice_malloc0_n(size_t n_blocks, size_t n_block_bytes) SPICE_GNUC_MALLOC SPICE_GNUC_ALLOC_SIZE2(1,2); void *spice_realloc_n(void *mem, size_t n_blocks, size_t n_block_bytes) SPICE_GNUC_WARN_UNUSED_RESULT; +SpiceChunks *spice_chunks_new(uint32_t count) SPICE_GNUC_MALLOC; +SpiceChunks *spice_chunks_new_linear(uint8_t *data, uint32_t len) SPICE_GNUC_MALLOC; +void spice_chunks_destroy(SpiceChunks *chunks); +void spice_chunks_linearize(SpiceChunks *chunks); size_t spice_strnlen(const char *str, size_t max_len); |