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

Lennart Poettering lennart at poettering.net
Sat Jun 6 16:16:25 PDT 2009


On Sun, 07.06.09 02:10, 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.

Hmm, you just want to rename the internal type? What would the benefit
of that be?

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