diff options
author | Benjamin Peterson <benjamin@python.org> | 2012-05-15 10:10:27 -0700 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2012-05-15 10:10:27 -0700 |
commit | fa58516f67e4c7f9d23658c6a46cf2e64f8d6290 (patch) | |
tree | 0dd9c49a5d47996d2674ca7a6e160c0c9a40d1c2 /Python/Python-ast.c | |
parent | 1d92ab176b8ed04c13666de4788fd995bb9fe4fb (diff) | |
download | cpython-fa58516f67e4c7f9d23658c6a46cf2e64f8d6290.tar.gz |
use Py_ssize_t for ast sequence lengths
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r-- | Python/Python-ast.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c index d9e13e28b0..4ca269f9f5 100644 --- a/Python/Python-ast.c +++ b/Python/Python-ast.c @@ -636,7 +636,7 @@ static int add_attributes(PyTypeObject* type, char**attrs, int num_fields) 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 @@ ast2obj_expr(void* _o) 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++) |