summaryrefslogtreecommitdiff
path: root/Python/Python-ast.c
diff options
context:
space:
mode:
authorMartin v. L?wis <martin@v.loewis.de>2012-05-15 14:45:03 +0200
committerMartin v. L?wis <martin@v.loewis.de>2012-05-15 14:45:03 +0200
commit6c56fb87a67308d5d9530ae892d8d5f230549c64 (patch)
treea8a3b7a7931de6849e97914658aaa9fbdcd5cc81 /Python/Python-ast.c
parent91bfead43af07b97da7b36ac577bbde34eb5cd01 (diff)
downloadcpython-6c56fb87a67308d5d9530ae892d8d5f230549c64.tar.gz
Widen ASDL sequences to Py_ssize_t lengths to better match PEP 353.
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 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++)