diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 12:45:03 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2012-05-15 12:45:03 (GMT) |
commit | cc10a37ef0e05906c0f1c93bea646f3521b84a76 (patch) | |
tree | 1fc5f7b5853db5490f382ff90c6469b02d537a66 /Python/Python-ast.c | |
parent | 33cac8578bede2e9d6688ff46e849df7c2897a26 (diff) | |
download | cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.zip cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.tar.gz cpython-cc10a37ef0e05906c0f1c93bea646f3521b84a76.tar.bz2 |
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.c | 4 |
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++) |