Rolland Dudemaine <[EMAIL PROTECTED]> added the comment:

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>
> __________________________________
>

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2497>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to