Skip to content
This repository was archived by the owner on Jul 5, 2023. It is now read-only.

FIX: Account form stdbool.h being included in Python.h #184

Merged
merged 1 commit into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ast27/Include/asdl.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions ast3/Python/ast.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,12 @@
#include <assert.h>

// VS 2010 doesn't have <stdbool.h>...
#ifndef __bool_true_false_are_defined
typedef int bool;
#define false 0
#define true 1
#endif


#if PY_MINOR_VERSION < 6
static PyObject *
Expand Down