@@ -67,12 +67,11 @@ static int
6767validate_comprehension (struct validator * state , asdl_comprehension_seq * gens )
6868{
6969 assert (!PyErr_Occurred ());
70- Py_ssize_t i ;
7170 if (!asdl_seq_LEN (gens )) {
7271 PyErr_SetString (PyExc_ValueError , "comprehension with no generators" );
7372 return 0 ;
7473 }
75- for (i = 0 ; i < asdl_seq_LEN (gens ); i ++ ) {
74+ for (Py_ssize_t i = 0 ; i < asdl_seq_LEN (gens ); i ++ ) {
7675 comprehension_ty comp = asdl_seq_GET (gens , i );
7776 if (!validate_expr (state , comp -> target , Store ) ||
7877 !validate_expr (state , comp -> iter , Load ) ||
@@ -86,8 +85,7 @@ static int
8685validate_keywords (struct validator * state , asdl_keyword_seq * keywords )
8786{
8887 assert (!PyErr_Occurred ());
89- Py_ssize_t i ;
90- for (i = 0 ; i < asdl_seq_LEN (keywords ); i ++ )
88+ for (Py_ssize_t i = 0 ; i < asdl_seq_LEN (keywords ); i ++ )
9189 if (!validate_expr (state , (asdl_seq_GET (keywords , i ))-> value , Load ))
9290 return 0 ;
9391 return 1 ;
@@ -97,8 +95,7 @@ static int
9795validate_args (struct validator * state , asdl_arg_seq * args )
9896{
9997 assert (!PyErr_Occurred ());
100- Py_ssize_t i ;
101- for (i = 0 ; i < asdl_seq_LEN (args ); i ++ ) {
98+ for (Py_ssize_t i = 0 ; i < asdl_seq_LEN (args ); i ++ ) {
10299 arg_ty arg = asdl_seq_GET (args , i );
103100 VALIDATE_POSITIONS (arg );
104101 if (arg -> annotation && !validate_expr (state , arg -> annotation , Load ))
0 commit comments