|
11 | 11 | #include "pythonrun.h" |
12 | 12 |
|
13 | 13 | #include <assert.h> |
| 14 | +#include <stdbool.h> |
14 | 15 |
|
15 | 16 | static int validate_stmts(asdl_seq *); |
16 | 17 | static int validate_exprs(asdl_seq *, expr_context_ty, int); |
@@ -611,7 +612,7 @@ static stmt_ty ast_for_with_stmt(struct compiling *, const node *, int); |
611 | 612 | static stmt_ty ast_for_for_stmt(struct compiling *, const node *, int); |
612 | 613 |
|
613 | 614 | /* Note different signature for ast_for_call */ |
614 | | -static expr_ty ast_for_call(struct compiling *, const node *, expr_ty, int); |
| 615 | +static expr_ty ast_for_call(struct compiling *, const node *, expr_ty, bool); |
615 | 616 |
|
616 | 617 | static PyObject *parsenumber(struct compiling *, const char *); |
617 | 618 | static expr_ty parsestrplus(struct compiling *, const node *n); |
@@ -1545,7 +1546,7 @@ ast_for_decorator(struct compiling *c, const node *n) |
1545 | 1546 | name_expr = NULL; |
1546 | 1547 | } |
1547 | 1548 | else { |
1548 | | - d = ast_for_call(c, CHILD(n, 3), name_expr, 0); |
| 1549 | + d = ast_for_call(c, CHILD(n, 3), name_expr, false); |
1549 | 1550 | if (!d) |
1550 | 1551 | return NULL; |
1551 | 1552 | name_expr = NULL; |
@@ -2368,7 +2369,7 @@ ast_for_trailer(struct compiling *c, const node *n, expr_ty left_expr) |
2368 | 2369 | return Call(left_expr, NULL, NULL, LINENO(n), |
2369 | 2370 | n->n_col_offset, c->c_arena); |
2370 | 2371 | else |
2371 | | - return ast_for_call(c, CHILD(n, 1), left_expr, 1); |
| 2372 | + return ast_for_call(c, CHILD(n, 1), left_expr, true); |
2372 | 2373 | } |
2373 | 2374 | else if (TYPE(CHILD(n, 0)) == DOT) { |
2374 | 2375 | PyObject *attr_id = NEW_IDENTIFIER(CHILD(n, 1)); |
@@ -2705,7 +2706,7 @@ ast_for_expr(struct compiling *c, const node *n) |
2705 | 2706 | } |
2706 | 2707 |
|
2707 | 2708 | static expr_ty |
2708 | | -ast_for_call(struct compiling *c, const node *n, expr_ty func, int allowgen) |
| 2709 | +ast_for_call(struct compiling *c, const node *n, expr_ty func, bool allowgen) |
2709 | 2710 | { |
2710 | 2711 | /* |
2711 | 2712 | arglist: argument (',' argument)* [','] |
@@ -3977,7 +3978,7 @@ ast_for_classdef(struct compiling *c, const node *n, asdl_seq *decorator_seq) |
3977 | 3978 | if (!dummy_name) |
3978 | 3979 | return NULL; |
3979 | 3980 | dummy = Name(dummy_name, Load, LINENO(n), n->n_col_offset, c->c_arena); |
3980 | | - call = ast_for_call(c, CHILD(n, 3), dummy, 0); |
| 3981 | + call = ast_for_call(c, CHILD(n, 3), dummy, false); |
3981 | 3982 | if (!call) |
3982 | 3983 | return NULL; |
3983 | 3984 | } |
|
0 commit comments