@@ -119,7 +119,7 @@ struct compiler_unit {
119119
120120 int u_firstlineno ; /* the first lineno of the block */
121121 int u_lineno ; /* the lineno for the current stmt */
122- bool u_lineno_set ; /* boolean to indicate whether instr
122+ int u_lineno_set ; /* boolean to indicate whether instr
123123 has been generated with current lineno */
124124};
125125
@@ -464,7 +464,7 @@ compiler_enter_scope(struct compiler *c, identifier name, void *key,
464464 u -> u_nfblocks = 0 ;
465465 u -> u_firstlineno = lineno ;
466466 u -> u_lineno = 0 ;
467- u -> u_lineno_set = false ;
467+ u -> u_lineno_set = 0 ;
468468 u -> u_consts = PyDict_New ();
469469 if (!u -> u_consts ) {
470470 compiler_unit_free (u );
@@ -643,7 +643,7 @@ compiler_set_lineno(struct compiler *c, int off)
643643 basicblock * b ;
644644 if (c -> u -> u_lineno_set )
645645 return ;
646- c -> u -> u_lineno_set = true ;
646+ c -> u -> u_lineno_set = 1 ;
647647 b = c -> u -> u_curblock ;
648648 b -> b_instr [off ].i_lineno = c -> u -> u_lineno ;
649649}
@@ -1675,7 +1675,7 @@ compiler_for(struct compiler *c, stmt_ty s)
16751675 /* XXX(nnorwitz): is there a better way to handle this?
16761676 for loops are special, we want to be able to trace them
16771677 each time around, so we need to set an extra line number. */
1678- c -> u -> u_lineno_set = false ;
1678+ c -> u -> u_lineno_set = 0 ;
16791679 ADDOP_JREL (c , FOR_ITER , cleanup );
16801680 VISIT (c , expr , s -> v .For .target );
16811681 VISIT_SEQ (c , stmt , s -> v .For .body );
@@ -1898,7 +1898,7 @@ compiler_try_except(struct compiler *c, stmt_ty s)
18981898 s -> v .TryExcept .handlers , i );
18991899 if (!handler -> type && i < n - 1 )
19001900 return compiler_error (c , "default 'except:' must be last" );
1901- c -> u -> u_lineno_set = false ;
1901+ c -> u -> u_lineno_set = 0 ;
19021902 c -> u -> u_lineno = handler -> lineno ;
19031903 except = compiler_new_block (c );
19041904 if (except == NULL )
@@ -2161,7 +2161,7 @@ compiler_visit_stmt(struct compiler *c, stmt_ty s)
21612161
21622162 /* Always assign a lineno to the next instruction for a stmt. */
21632163 c -> u -> u_lineno = s -> lineno ;
2164- c -> u -> u_lineno_set = false ;
2164+ c -> u -> u_lineno_set = 0 ;
21652165
21662166 switch (s -> kind ) {
21672167 case FunctionDef_kind :
@@ -3015,7 +3015,7 @@ compiler_visit_expr(struct compiler *c, expr_ty e)
30153015 */
30163016 if (e -> lineno > c -> u -> u_lineno ) {
30173017 c -> u -> u_lineno = e -> lineno ;
3018- c -> u -> u_lineno_set = false ;
3018+ c -> u -> u_lineno_set = 0 ;
30193019 }
30203020 switch (e -> kind ) {
30213021 case BoolOp_kind :
0 commit comments