mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-11-08 13:29:59 -05:00
Remove pa_bool_t and replace it with bool.
commands used for this (executed from the pulseaudio/src directory):
find . -regex '\(.*\.[hc]\|.*\.cc\|.*\.m4\)' -not -name 'macro.h' \
-a -not -name 'reserve.[ch]' -a -not -name 'reserve-monitor.[ch]' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'glib-mainloop.c' -a -not -name 'gkt-test.c' \
-a -not -name 'poll-win32.c' -a -not -name 'thread-win32.c' \
-a -not -name 'dllmain.c' -a -not -name 'gconf-helper.c' \
-exec sed -i -e 's/\bpa_bool_t\b/bool/g' \
-e 's/\bTRUE\b/true/g' -e 's/\bFALSE\b/false/g' {} \;
and:
sed -i -e '181,194!s/\bpa_bool_t\b/bool/' \
-e '181,194!s/\bTRUE\b/true/' -e \
'181,194!s/\bFALSE\b/false/' pulsecore/macro.h
This commit is contained in:
parent
e9822bfcb0
commit
d806b19714
288 changed files with 3360 additions and 3360 deletions
|
|
@ -66,7 +66,7 @@ pa_asyncmsgq *pa_asyncmsgq_new(unsigned size) {
|
|||
|
||||
PA_REFCNT_INIT(a);
|
||||
pa_assert_se(a->asyncq = pa_asyncq_new(size));
|
||||
pa_assert_se(a->mutex = pa_mutex_new(FALSE, TRUE));
|
||||
pa_assert_se(a->mutex = pa_mutex_new(false, true));
|
||||
a->current = NULL;
|
||||
|
||||
return a;
|
||||
|
|
@ -76,7 +76,7 @@ static void asyncmsgq_free(pa_asyncmsgq *a) {
|
|||
struct asyncmsgq_item *i;
|
||||
pa_assert(a);
|
||||
|
||||
while ((i = pa_asyncq_pop(a->asyncq, FALSE))) {
|
||||
while ((i = pa_asyncq_pop(a->asyncq, false))) {
|
||||
|
||||
pa_assert(!i->semaphore);
|
||||
|
||||
|
|
@ -161,7 +161,7 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
|
|||
|
||||
/* This mutex makes the queue multiple-writer safe. This lock is only used on the writing side */
|
||||
pa_mutex_lock(a->mutex);
|
||||
pa_assert_se(pa_asyncq_push(a->asyncq, &i, TRUE) == 0);
|
||||
pa_assert_se(pa_asyncq_push(a->asyncq, &i, true) == 0);
|
||||
pa_mutex_unlock(a->mutex);
|
||||
|
||||
pa_semaphore_wait(i.semaphore);
|
||||
|
|
@ -172,7 +172,7 @@ int pa_asyncmsgq_send(pa_asyncmsgq *a, pa_msgobject *object, int code, const voi
|
|||
return i.ret;
|
||||
}
|
||||
|
||||
int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, pa_bool_t wait_op) {
|
||||
int pa_asyncmsgq_get(pa_asyncmsgq *a, pa_msgobject **object, int *code, void **userdata, int64_t *offset, pa_memchunk *chunk, bool wait_op) {
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
pa_assert(!a->current);
|
||||
|
||||
|
|
@ -246,7 +246,7 @@ int pa_asyncmsgq_wait_for(pa_asyncmsgq *a, int code) {
|
|||
pa_memchunk chunk;
|
||||
int ret;
|
||||
|
||||
if (pa_asyncmsgq_get(a, &o, &c, &data, &offset, &chunk, TRUE) < 0)
|
||||
if (pa_asyncmsgq_get(a, &o, &c, &data, &offset, &chunk, true) < 0)
|
||||
return -1;
|
||||
|
||||
ret = pa_asyncmsgq_dispatch(o, c, data, offset, &chunk);
|
||||
|
|
@ -269,7 +269,7 @@ int pa_asyncmsgq_process_one(pa_asyncmsgq *a) {
|
|||
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
|
||||
if (pa_asyncmsgq_get(a, &object, &code, &data, &offset, &chunk, FALSE) < 0)
|
||||
if (pa_asyncmsgq_get(a, &object, &code, &data, &offset, &chunk, false) < 0)
|
||||
return 0;
|
||||
|
||||
pa_asyncmsgq_ref(a);
|
||||
|
|
@ -324,7 +324,7 @@ int pa_asyncmsgq_dispatch(pa_msgobject *object, int code, void *userdata, int64_
|
|||
return 0;
|
||||
}
|
||||
|
||||
void pa_asyncmsgq_flush(pa_asyncmsgq *a, pa_bool_t run) {
|
||||
void pa_asyncmsgq_flush(pa_asyncmsgq *a, bool run) {
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
|
||||
for (;;) {
|
||||
|
|
@ -335,7 +335,7 @@ void pa_asyncmsgq_flush(pa_asyncmsgq *a, pa_bool_t run) {
|
|||
pa_memchunk chunk;
|
||||
int ret;
|
||||
|
||||
if (pa_asyncmsgq_get(a, &object, &code, &data, &offset, &chunk, FALSE) < 0)
|
||||
if (pa_asyncmsgq_get(a, &object, &code, &data, &offset, &chunk, false) < 0)
|
||||
return;
|
||||
|
||||
if (!run) {
|
||||
|
|
@ -350,7 +350,7 @@ void pa_asyncmsgq_flush(pa_asyncmsgq *a, pa_bool_t run) {
|
|||
}
|
||||
}
|
||||
|
||||
pa_bool_t pa_asyncmsgq_dispatching(pa_asyncmsgq *a) {
|
||||
bool pa_asyncmsgq_dispatching(pa_asyncmsgq *a) {
|
||||
pa_assert(PA_REFCNT_VALUE(a) > 0);
|
||||
|
||||
return !!a->current;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue