memblock: Add pa_memblock_acquire_chunk().

Besides making the code a bit cleaner, this also gets rid of
a few "cast increases required alignment of target type"
warnings.
This commit is contained in:
Tanu Kaskinen 2012-08-17 18:09:34 +03:00 committed by Tanu Kaskinen
parent 33e5802df2
commit 3d6092bb0f
16 changed files with 52 additions and 40 deletions

View file

@ -22,16 +22,18 @@
USA.
***/
typedef struct pa_memchunk pa_memchunk;
#include <pulsecore/memblock.h>
/* A memchunk describes a part of a memblock. In contrast to the memblock, a
* memchunk is not allocated dynamically or reference counted, instead
* it is usually stored on the stack and copied around */
typedef struct pa_memchunk {
struct pa_memchunk {
pa_memblock *memblock;
size_t index, length;
} pa_memchunk;
};
/* Make a memchunk writable, i.e. make sure that the caller may have
* exclusive access to the memblock and it is not read-only. If needed