Index: Python/ast.c =================================================================== --- Python/ast.c (revision 62583) +++ Python/ast.c (working copy) @@ -332,7 +332,7 @@ */ static int -set_context(expr_ty e, expr_context_ty ctx, const node *n) +set_context(struct compiling *c, expr_ty e, expr_context_ty ctx, const node *n) { asdl_seq *s = NULL; /* If a particular expression type can't be used for assign / delete, @@ -434,7 +434,7 @@ int i; for (i = 0; i < asdl_seq_LEN(s); i++) { - if (!set_context((expr_ty)asdl_seq_GET(s, i), ctx, n)) + if (!set_context(c, (expr_ty)asdl_seq_GET(s, i), ctx, n)) return 0; } } @@ -442,7 +442,7 @@ } static operator_ty -ast_for_augassign(const node *n) +ast_for_augassign(struct compiling *c, const node *n) { REQ(n, augassign); n = CHILD(n, 0); @@ -480,7 +480,7 @@ } static cmpop_ty -ast_for_comp_op(const node *n) +ast_for_comp_op(struct compiling *c, const node *n) { /* comp_op: '<'|'>'|'=='|'>='|'<='|'<>'|'!='|'in'|'not' 'in'|'is' |'is' 'not' @@ -606,7 +606,7 @@ } result = Tuple(args, Store, LINENO(n), n->n_col_offset, c->c_arena); - if (!set_context(result, Store, n)) + if (!set_context(c, result, Store, n)) return NULL; return result; } @@ -947,7 +947,7 @@ */ static int -count_list_fors(const node *n) +count_list_fors(struct compiling *c, const node *n) { int n_fors = 0; node *ch = CHILD(n, 1); @@ -984,7 +984,7 @@ */ static int -count_list_ifs(const node *n) +count_list_ifs(struct compiling *c, const node *n) { int n_ifs = 0; @@ -1022,7 +1022,7 @@ if (!elt) return NULL; - n_fors = count_list_fors(n); + n_fors = count_list_fors(c, n); if (n_fors == -1) return NULL; @@ -1066,7 +1066,7 @@ expr_ty list_for_expr; ch = CHILD(ch, 4); - n_ifs = count_list_ifs(ch); + n_ifs = count_list_ifs(c, ch); if (n_ifs == -1) return NULL; @@ -1104,7 +1104,7 @@ */ static int -count_gen_fors(const node *n) +count_gen_fors(struct compiling *c, const node *n) { int n_fors = 0; node *ch = CHILD(n, 1); @@ -1142,7 +1142,7 @@ */ static int -count_gen_ifs(const node *n) +count_gen_ifs(struct compiling *c, const node *n) { int n_ifs = 0; @@ -1177,7 +1177,7 @@ if (!elt) return NULL; - n_fors = count_gen_fors(n); + n_fors = count_gen_fors(c, n); if (n_fors == -1) return NULL; @@ -1220,7 +1220,7 @@ asdl_seq *ifs; ch = CHILD(ch, 4); - n_ifs = count_gen_ifs(ch); + n_ifs = count_gen_ifs(c, ch); if (n_ifs == -1) return NULL; @@ -1766,7 +1766,7 @@ for (i = 1; i < NCH(n); i += 2) { cmpop_ty newoperator; - newoperator = ast_for_comp_op(CHILD(n, i)); + newoperator = ast_for_comp_op(c, CHILD(n, i)); if (!newoperator) { return NULL; } @@ -2065,7 +2065,7 @@ "assignment"); return NULL; } - if(!set_context(expr1, Store, ch)) + if(!set_context(c, expr1, Store, ch)) return NULL; ch = CHILD(n, 2); @@ -2076,7 +2076,7 @@ if (!expr2) return NULL; - newoperator = ast_for_augassign(CHILD(n, 1)); + newoperator = ast_for_augassign(c, CHILD(n, 1)); if (!newoperator) return NULL; @@ -2107,7 +2107,7 @@ if (!e) return NULL; - if (!set_context(e, Store, CHILD(n, i))) + if (!set_context(c, e, Store, CHILD(n, i))) return NULL; asdl_seq_SET(targets, i / 2, e); @@ -2172,7 +2172,7 @@ if (!e) return NULL; asdl_seq_SET(seq, i / 2, e); - if (context && !set_context(e, context, CHILD(n, i))) + if (context && !set_context(c, e, context, CHILD(n, i))) return NULL; } return seq; @@ -2853,7 +2853,7 @@ expr_ty e = ast_for_expr(c, CHILD(exc, 3)); if (!e) return NULL; - if (!set_context(e, Store, CHILD(exc, 3))) + if (!set_context(c, e, Store, CHILD(exc, 3))) return NULL; expression = ast_for_expr(c, CHILD(exc, 1)); if (!expression) @@ -2975,7 +2975,7 @@ if (!optional_vars) { return NULL; } - if (!set_context(optional_vars, Store, n)) { + if (!set_context(c, optional_vars, Store, n)) { return NULL; } suite_index = 4;