@@ -600,8 +600,8 @@ static asdl_seq *ast_for_exprlist(struct compiling *, const node *,
600600static expr_ty ast_for_testlist (struct compiling * , const node * );
601601static stmt_ty ast_for_classdef (struct compiling * , const node * , asdl_seq * );
602602
603- static stmt_ty ast_for_with_stmt (struct compiling * , const node * , int );
604- static stmt_ty ast_for_for_stmt (struct compiling * , const node * , int );
603+ static stmt_ty ast_for_with_stmt (struct compiling * , const node * , bool );
604+ static stmt_ty ast_for_for_stmt (struct compiling * , const node * , bool );
605605
606606/* Note different signature for ast_for_call */
607607static expr_ty ast_for_call (struct compiling * , const node * , expr_ty , bool );
@@ -1570,10 +1570,10 @@ ast_for_decorators(struct compiling *c, const node *n)
15701570
15711571static stmt_ty
15721572ast_for_funcdef_impl (struct compiling * c , const node * n0 ,
1573- asdl_seq * decorator_seq , int is_async )
1573+ asdl_seq * decorator_seq , bool is_async )
15741574{
15751575 /* funcdef: 'def' NAME parameters ['->' test] ':' suite */
1576- const node * const n = is_async == 0 ? n0 : CHILD (n0 , 1 );
1576+ const node * const n = is_async ? CHILD (n0 , 1 ) : n0 ;
15771577 identifier name ;
15781578 arguments_ty args ;
15791579 asdl_seq * body ;
@@ -1618,15 +1618,15 @@ ast_for_async_funcdef(struct compiling *c, const node *n, asdl_seq *decorator_se
16181618 REQ (CHILD (n , 1 ), funcdef );
16191619
16201620 return ast_for_funcdef_impl (c , n , decorator_seq ,
1621- 1 /* is_async */ );
1621+ true /* is_async */ );
16221622}
16231623
16241624static stmt_ty
16251625ast_for_funcdef (struct compiling * c , const node * n , asdl_seq * decorator_seq )
16261626{
16271627 /* funcdef: 'def' NAME parameters ['->' test] ':' suite */
16281628 return ast_for_funcdef_impl (c , n , decorator_seq ,
1629- 0 /* is_async */ );
1629+ false /* is_async */ );
16301630}
16311631
16321632
@@ -1641,14 +1641,14 @@ ast_for_async_stmt(struct compiling *c, const node *n)
16411641 switch (TYPE (CHILD (n , 1 ))) {
16421642 case funcdef :
16431643 return ast_for_funcdef_impl (c , n , NULL ,
1644- 1 /* is_async */ );
1644+ true /* is_async */ );
16451645 case with_stmt :
16461646 return ast_for_with_stmt (c , n ,
1647- 1 /* is_async */ );
1647+ true /* is_async */ );
16481648
16491649 case for_stmt :
16501650 return ast_for_for_stmt (c , n ,
1651- 1 /* is_async */ );
1651+ true /* is_async */ );
16521652
16531653 default :
16541654 PyErr_Format (PyExc_SystemError ,
@@ -3682,9 +3682,9 @@ ast_for_while_stmt(struct compiling *c, const node *n)
36823682}
36833683
36843684static stmt_ty
3685- ast_for_for_stmt (struct compiling * c , const node * n0 , int is_async )
3685+ ast_for_for_stmt (struct compiling * c , const node * n0 , bool is_async )
36863686{
3687- const node * const n = is_async == 0 ? n0 : CHILD (n0 , 1 );
3687+ const node * const n = is_async ? CHILD (n0 , 1 ) : n0 ;
36883688 asdl_seq * _target , * seq = NULL , * suite_seq ;
36893689 expr_ty expression ;
36903690 expr_ty target , first ;
@@ -3871,9 +3871,9 @@ ast_for_with_item(struct compiling *c, const node *n)
38713871
38723872/* with_stmt: 'with' with_item (',' with_item)* ':' suite */
38733873static stmt_ty
3874- ast_for_with_stmt (struct compiling * c , const node * n0 , int is_async )
3874+ ast_for_with_stmt (struct compiling * c , const node * n0 , bool is_async )
38753875{
3876- const node * const n = is_async == 0 ? n0 : CHILD (n0 , 1 );
3876+ const node * const n = is_async ? CHILD (n0 , 1 ) : n0 ;
38773877 int i , n_items ;
38783878 asdl_seq * items , * body ;
38793879
0 commit comments