summaryrefslogtreecommitdiff
path: root/src/pulsecore/memchunk.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2006-08-29 01:16:47 +0000
committerLennart Poettering <lennart@poettering.net>2006-08-29 01:16:47 +0000
commit327e0cd8e1e81999dd855e38d3cb3b414aeadc7a (patch)
tree1eda881bf47d2b865f456506bfdd71385557f407 /src/pulsecore/memchunk.c
parent9948cb09a3e1b976ad1705df06ef24216a61bf85 (diff)
modify memory block reference counting to use the new reference counting API
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@1342 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/pulsecore/memchunk.c')
-rw-r--r--src/pulsecore/memchunk.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/pulsecore/memchunk.c b/src/pulsecore/memchunk.c
index bcf0ce04..1dbad2b9 100644
--- a/src/pulsecore/memchunk.c
+++ b/src/pulsecore/memchunk.c
@@ -38,9 +38,11 @@ void pa_memchunk_make_writable(pa_memchunk *c, size_t min) {
assert(c);
assert(c->memblock);
- assert(c->memblock->ref >= 1);
+ assert(PA_REFCNT_VALUE(c->memblock) > 0);
- if (c->memblock->ref == 1 && !c->memblock->read_only && c->memblock->length >= c->index+min)
+ if (PA_REFCNT_VALUE(c->memblock) == 1 &&
+ !c->memblock->read_only &&
+ c->memblock->length >= c->index+min)
return;
l = c->length;