Skip to content

Commit 16137fe

Browse files
zwarebenjaminp
authored andcommitted
bpo-27780: Make pgen.c C89 compliant (GH-7915)
1 parent 7820973 commit 16137fe

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Parser/pgen.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,6 +405,7 @@ makedfa(nfagrammar *gr, nfa *nf, dfa *d)
405405
int istate, jstate, iarc, jarc, ibit;
406406
nfastate *st;
407407
nfaarc *ar;
408+
int i, j;
408409

409410
ss = newbitset(nbits);
410411
addclosure(ss, nf, nf->nf_start);
@@ -499,8 +500,8 @@ makedfa(nfagrammar *gr, nfa *nf, dfa *d)
499500

500501
convert(d, xx_nstates, xx_state);
501502

502-
for (int i = 0; i < xx_nstates; i++) {
503-
for (int j = 0; j < xx_state[i].ss_narcs; j++)
503+
for (i = 0; i < xx_nstates; i++) {
504+
for (j = 0; j < xx_state[i].ss_narcs; j++)
504505
delbitset(xx_state[i].ss_arc[j].sa_bitset);
505506
PyObject_FREE(xx_state[i].ss_arc);
506507
}

0 commit comments

Comments
 (0)