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

Felipe Contreras felipe.contreras at gmail.com
Sat Jun 6 06:46:19 PDT 2009


On Sat, Jun 6, 2009 at 4:28 PM, Lennart
Poettering<lennart at poettering.net> wrote:
> On Sat, 06.06.09 16:05, Felipe Contreras (felipe.contreras at gmail.com) wrote:
>
>> > Internally we actually use a definition like you suggested, but we
>> > don't want to push that into the ABI and hence trigger breakage
>> > there. Our definition is like this:
>> >
>> > #ifdef HAVE_STD_BOOL
>> > typedef _Bool pa_bool_t;
>> > #else
>> > typedef int pa_bool_t;
>> > #endif
>>
>> You said pa_bool_t is only internal, so it's safe to do:
>>
>> #if HAVE_STDBOOL_H
>> #include <stdbool.h>
>> #else
>> typedef int bool
>> #endif
>>
>> And s/pa_bool_t/bool/
>>
>> If you have C99, pa_bool_t = _Bool, bool = _Bool
>> If you don't: pa_bool_t = int, bool = int
>
> The big issue is that you would change the ABI depending on the
> compiler used. That sucks.

Yeah, but according to what you pasted you are already doing that;
sometimes pa_bool_t is _Bool, and sometimes it's int, right?

-- 
Felipe Contreras



More information about the pulseaudio-discuss mailing list