[issue2497] stdbool support

2009-03-28 Thread R. David Murray
R. David Murray added the comment: Since Martin said this should be rejected, I'm closing it rejected. -- nosy: +bitdancer resolution: -> rejected stage: -> committed/rejected status: open -> closed ___ Python tracker

[issue2497] stdbool support

2008-03-28 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > If stdbool is not available, C99 still defines false and true as macros. What do you mean by that? In C99, true and false are *not* defined in a translation unit unless stdbool.h is included, see 7.16. > If stdbool is available, then most

[issue2497] stdbool support

2008-03-28 Thread Rolland Dudemaine
Rolland Dudemaine <[EMAIL PROTECTED]> added the comment: In this precise case, this is for an RTOS called INTEGRITY, which does define true and false as macros. The compiler is the vendor compiler (Green Hills), but the definition conflicting with Python's definition is comiung from the system

[issue2497] stdbool support

2008-03-27 Thread Martin v. Löwis
Martin v. Löwis <[EMAIL PROTECTED]> added the comment: > Some compilers define false and true as macros. Which compilers specifically? It sounds like a violation of the C standard to do so, without stdbool.h being included. > Using stdbool.h when it is available will ensure bool is defined as a

[issue2497] stdbool support

2008-03-27 Thread Rolland Dudemaine
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. Us

[issue2497] stdbool support

2008-03-27 Thread Martin v. Löwis
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]>

[issue2497] stdbool support

2008-03-27 Thread Rolland Dudemaine
Changes by Rolland Dudemaine <[EMAIL PROTECTED]>: -- type: -> compile error __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue2497] stdbool support

2008-03-27 Thread Rolland Dudemaine
New submission from Rolland Dudemaine <[EMAIL PROTECTED]>: For better portability, it is good to support stdbool.h when it exists. This prevents a potential issue when compiling asdl.c. Patch attached. -- components: Build files: python_stdbool_20080327.diff keywords: patch messages: 645