This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rolland
Recipients loewis, rolland
Date 2008-03-27.23:55:22
SpamBayes Score 0.16648245
Marked as misclassified No
Message-id <[email protected]>
In-reply-to <[email protected]>
Content
Some compilers define false and true as macros.
When doing this, the definition in asdl.h (included from asdl.c) which 
is originally :
typedef enum {false, true} bool;
therefore becomes :
typedef enum {0, 1} bool;
which is non-sensical.
Using stdbool.h when it is available will ensure bool is defined as a 
type following the correct definition, which may or may not be an enum 
depending on the compiler.
Even when using gcc, stdbool.h is here to define bool in C language, so 
why not use it ?

--Rolland

Martin v. Löwis wrote:
> Martin v. Löwis <[email protected]> added the comment:
>
> Why does it improve portability to use stdbool.h when it exists?
>
> What is the potential issue with asdl.c that gets fixed with this patch?
>
> ----------
> nosy: +loewis
>
> __________________________________
> Tracker <[email protected]>
> <http://bugs.python.org/issue2497>
> __________________________________
>
History
Date User Action Args
2008-03-27 23:55:24rollandsetspambayes_score: 0.166482 -> 0.16648245
recipients: + rolland, loewis
2008-03-27 23:55:23rollandlinkissue2497 messages
2008-03-27 23:55:23rollandcreate