summaryrefslogtreecommitdiffstats
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2012-05-15 17:10:27 (GMT)
committerBenjamin Peterson <benjamin@python.org>2012-05-15 17:10:27 (GMT)
commit77fa9379e2fd9c074b4c002c0fd5d43caca80fff (patch)
tree31579855124ad12ff3fa985f081164966820b472 /Python/Python-ast.c
parentc5f31ed63d7db6f7e13112790d15a6274ca7c2cf (diff)
downloadcpython-77fa9379e2fd9c074b4c002c0fd5d43caca80fff.zip
cpython-77fa9379e2fd9c074b4c002c0fd5d43caca80fff.tar.gz
cpython-77fa9379e2fd9c074b4c002c0fd5d43caca80fff.tar.bz2
use Py_ssize_t for ast sequence lengths
Diffstat (limited to 'Python/Python-ast.c')
-rw-r--r--Python/Python-ast.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/Python-ast.c b/Python/Python-ast.c
index d9e13e2..4ca269f 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++)