[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 comiu

[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-se

[issue2497] stdbool support

2008-03-27 Thread Rolland Dudemaine
Changes by Rolland Dudemaine <[EMAIL PROTECTED]>: -- type: -> compile error __ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2497> __ ___ Pyt

[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 me

[issue2443] uninitialized access to va_list

2008-03-27 Thread Rolland Dudemaine
Rolland Dudemaine <[EMAIL PROTECTED]> added the comment: Actually, this thing is more complex to solve than I thought. Specifically, as described in http://www.opengroup.org/onlinepubs/007908775/xsh/stdarg.h.html stdarg requires that variable argument functions have at least one fixed ar

[issue2443] uninitialized access to va_list

2008-03-25 Thread Rolland Dudemaine
Rolland Dudemaine <[EMAIL PROTECTED]> added the comment: This is what I meant. The initialization should be done by calling va_start(count_va); as you described. In the files and lines I reported though, this is not called. I'll file a patch for it soon. --Rolland Dudemaine

[issue2443] uninitialized access to va_list

2008-03-21 Thread Rolland Dudemaine
New submission from Rolland Dudemaine <[EMAIL PROTECTED]>: In many files, the following code is present (with slight variations, but the important part is there) : static PyObject * objargs_mktuple(va_list va) { int i, n = 0; va_list countva; PyObject *result