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

Lennart Poettering lennart at poettering.net
Sat Jun 6 15:03:48 PDT 2009


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.

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