Although...

bool is typedefed here:
> #ifndef __cplusplus
> 
> typedef int bool;
> #  define false (0)
> #  define true (!false)
> 
> #endif /* __cplusplus */

then we have:
> ID3_STRUCT(Mp3_Headerinfo)
> {
>   Mpeg_Layers layer;
>   Mpeg_Version version;
>   MP3_BitRates bitrate;
>   Mp3_ChannelMode channelmode;
>   Mp3_ModeExt modeext;
>   Mp3_Emphasis emphasis;
>   Mp3_Crc crc;
>   uint32 vbr_bitrate;           // avg bitrate from xing header
>   uint32 frequency;             // samplerate
>   uint32 framesize;
>   uint32 frames;                // nr of frames
>   uint32 time;                  // nr of seconds in song
>   bool privatebit;
>   bool copyrighted;
>   bool original;
> };

(+ other things using bool)

So switching to stdbool.h will break the ABI of this structure from C
(but not from C++) which is unfortunate. But I think it's already a bit
broken because id3 itself is compiled with C++. Maybe switching to
stdbool.h will unbreak it ???

There are also functions that return "bool". At least on x86_64 the top
bits of a bool are unspecified so false could be interpreted as true by
a C program. I guess it only works right now by luck!

James

Reply via email to