[pulseaudio-discuss] [PATCH 1/4] stream-restore: add volume_is_absolute bool in client side

Lennart Poettering lennart at poettering.net
Sat May 9 05:14:44 PDT 2009


On Sat, 09.05.09 12:50, Felipe Contreras (felipe.contreras at gmail.com) wrote:

> > pa_bool_t is used internally only. In the public API we only expose
> > ints. pa_bool_t is defined as _Bool on C99 and int on other
> > compilers. This discrepancy should not be visible to outside due to
> > ABI stability issues.
> 
> Minor comment; if you include stdbool.h you can use 'bool' which IMHO
> is less ugly than _Bool. And I wonder what's the point of pa_bool_t...
> if the compiler doesn't have stdbool.h, then just define 'bool' as you
> would define pa_bool_t.

There's not much difference between _Bool, and bool. Both are C99. 

I guess 10 years after C99 it might be possible to drop C89
support. But uh, the API uses int for all bools and we should stick to
it for now.

Lennart

-- 
Lennart Poettering                        Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/           GnuPG 0x1A015CC4



More information about the pulseaudio-discuss mailing list