diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2013-11-18 00:07:38 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2013-11-18 00:07:38 (GMT) |
commit | 3a8a333942512657195679a49a91a1846f740928 (patch) | |
tree | c0c5f1329e5af80e4f79e6f39e7e02d13adf8e3e /Parser/grammar.c | |
parent | 6dd0d461a4e1f3d02784598f1efae185c0bf06bc (diff) | |
download | cpython-3a8a333942512657195679a49a91a1846f740928.zip cpython-3a8a333942512657195679a49a91a1846f740928.tar.gz cpython-3a8a333942512657195679a49a91a1846f740928.tar.bz2 |
Fix compiler warnings on Windows 64-bit in grammar.c
INT_MAX states and labels should be enough for everyone
Diffstat (limited to 'Parser/grammar.c')
-rw-r--r-- | Parser/grammar.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Parser/grammar.c b/Parser/grammar.c index d4270de..b598294 100644 --- a/Parser/grammar.c +++ b/Parser/grammar.c @@ -63,7 +63,7 @@ addstate(dfa *d) s->s_upper = 0; s->s_accel = NULL; s->s_accept = 0; - return s - d->d_state; + return Py_SAFE_DOWNCAST(s - d->d_state, Py_intptr_t, int); } void @@ -105,7 +105,7 @@ addlabel(labellist *ll, int type, const char *str) if (Py_DebugFlag) printf("Label @ %8p, %d: %s\n", ll, ll->ll_nlabels, PyGrammar_LabelRepr(lb)); - return lb - ll->ll_label; + return Py_SAFE_DOWNCAST(lb - ll->ll_label, Py_intptr_t, int); } /* Same, but rather dies than adds */ |