diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-07-06 14:39:15 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-07-07 23:10:47 +0200 |
commit | a415c557657c2009798d086b229c17ac0d47a978 (patch) | |
tree | c4732d09b7fb8c54138f43234ebe6a883b42875f /common/mem.h | |
parent | f39d64f40bca094396d5002dcfcd38eaa281c9af (diff) | |
download | spice-a415c557657c2009798d086b229c17ac0d47a978.tar.gz spice-a415c557657c2009798d086b229c17ac0d47a978.tar.xz spice-a415c557657c2009798d086b229c17ac0d47a978.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 9b257ade..ebf2fb8c 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); |