[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 16:10:03 PDT 2009


On Sun, Jun 7, 2009 at 1:03 AM, Lennart
Poettering<lennart at poettering.net> wrote:
> On Sat, 06.06.09 16:46, Felipe Contreras (felipe.contreras at gmail.com) wrote:
>
>> >> #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?
>
> Yes, but only internally. The internal ABIs don't matter, they are not
> built with different compilers, it doesn't matter if the size/encoding
> of things changes when you switch compilers or the configuration.
>
> However, when you export something in the public ABI you need to make
> sure it's the same on all compilers with all configurations.

I don't think you are getting what I'm saying; I'm proposing to
replace 'pa_bool_t' with 'bool'. 'pa_bool_t' is used only internally,
therefore I'm proposing to use 'bool' only internally.

-- 
Felipe Contreras



More information about the pulseaudio-discuss mailing list