mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-07 13:30:03 -05:00
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:
parent
33e5802df2
commit
3d6092bb0f
16 changed files with 52 additions and 40 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue