[Python-checkins] bpo-27780: Make pgen.c C89 compliant (GH-7915)

Benjamin Peterson webhook-mailer at python.org
Mon Jun 25 23:40:22 EDT 2018


https://github.com/python/cpython/commit/16137fe22f3f9bbbd50fac2a729172976c553718
commit: 16137fe22f3f9bbbd50fac2a729172976c553718
branch: 2.7
author: Zachary Ware <zachary.ware at gmail.com>
committer: Benjamin Peterson <benjamin at python.org>
date: 2018年06月25日T20:40:15-07:00
summary:
bpo-27780: Make pgen.c C89 compliant (GH-7915)
files:
M Parser/pgen.c
diff --git a/Parser/pgen.c b/Parser/pgen.c
index 6b2cdeca2ccd..b20d9764a168 100644
--- a/Parser/pgen.c
+++ b/Parser/pgen.c
@@ -405,6 +405,7 @@ makedfa(nfagrammar *gr, nfa *nf, dfa *d)
 int istate, jstate, iarc, jarc, ibit;
 nfastate *st;
 nfaarc *ar;
+ int i, j;
 
 ss = newbitset(nbits);
 addclosure(ss, nf, nf->nf_start);
@@ -499,8 +500,8 @@ makedfa(nfagrammar *gr, nfa *nf, dfa *d)
 
 convert(d, xx_nstates, xx_state);
 
- for (int i = 0; i < xx_nstates; i++) {
- for (int j = 0; j < xx_state[i].ss_narcs; j++)
+ for (i = 0; i < xx_nstates; i++) {
+ for (j = 0; j < xx_state[i].ss_narcs; j++)
 delbitset(xx_state[i].ss_arc[j].sa_bitset);
 PyObject_FREE(xx_state[i].ss_arc);
 }


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /