diff --git a/ast27/Include/asdl.h b/ast27/Include/asdl.h index 2e5045b4..b8a5d2f2 100644 --- a/ast27/Include/asdl.h +++ b/ast27/Include/asdl.h @@ -8,8 +8,10 @@ typedef PyObject * string; typedef PyObject * object; #ifndef __cplusplus +#ifndef __bool_true_false_are_defined typedef enum {false, true} bool; #endif +#endif /* It would be nice if the code generated by asdl_c.py was completely independent of Python, but it is a goal the requires too much work diff --git a/ast3/Python/ast.c b/ast3/Python/ast.c index 60b8fdd4..b87a8604 100644 --- a/ast3/Python/ast.c +++ b/ast3/Python/ast.c @@ -13,9 +13,12 @@ #include // VS 2010 doesn't have ... +#ifndef __bool_true_false_are_defined typedef int bool; #define false 0 #define true 1 +#endif + #if PY_MINOR_VERSION < 6 static PyObject *