Mercurial > cpython-lru_cache-weakref
diff Python/Python-ast.c @ 76964:c18a1a82bb07
use Py_ssize_t for ast sequence lengths
| author | Benjamin Peterson <benjamin@python.org> |
|---|---|
| date | Tue, 15 May 2012 10:10:27 -0700 |
| parents | 99ed87c8e24c |
| children | 048d8d9aecf1 |
line wrap: on
line diff
--- a/Python/Python-ast.c Wed May 16 00:07:24 2012 +0800 +++ b/Python/Python-ast.c Tue May 15 10:10:27 2012 -0700 @@ -636,7 +636,7 @@ static PyObject* ast2obj_list(asdl_seq *seq, PyObject* (*func)(void*)) { - int i, n = asdl_seq_LEN(seq); + Py_ssize_t i, n = asdl_seq_LEN(seq); PyObject *result = PyList_New(n); PyObject *value; if (!result) @@ -2857,7 +2857,7 @@ goto failed; Py_DECREF(value); { - int i, n = asdl_seq_LEN(o->v.Compare.ops); + Py_ssize_t i, n = asdl_seq_LEN(o->v.Compare.ops); value = PyList_New(n); if (!value) goto failed; for(i = 0; i < n; i++)
