diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-02-15 17:27:45 (GMT) |
commit | 18e165558b24d29e7e0ca501842b9236589b012a (patch) | |
tree | 841678b5dc1aff3aa48701fee33a6ba7be00a72b /Modules/parsermodule.c | |
parent | 44829297348d9121a03fc7df2fac557b583cc7fa (diff) | |
download | cpython-18e165558b24d29e7e0ca501842b9236589b012a.zip cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.gz cpython-18e165558b24d29e7e0ca501842b9236589b012a.tar.bz2 |
Merge ssize_t branch.
Diffstat (limited to 'Modules/parsermodule.c')
-rw-r--r-- | Modules/parsermodule.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/Modules/parsermodule.c b/Modules/parsermodule.c index b2b32df..514e7e6 100644 --- a/Modules/parsermodule.c +++ b/Modules/parsermodule.c @@ -55,9 +55,9 @@ PyDoc_STRVAR(parser_doc_string, static char parser_version_string[] = "0.5"; -typedef PyObject* (*SeqMaker) (int length); +typedef PyObject* (*SeqMaker) (Py_ssize_t length); typedef int (*SeqInserter) (PyObject* sequence, - int index, + Py_ssize_t index, PyObject* element); /* The function below is copyrighted by Stichting Mathematisch Centrum. The @@ -632,8 +632,9 @@ parser_tuple2st(PyST_Object *self, PyObject *args, PyObject *kw) static node* build_node_children(PyObject *tuple, node *root, int *line_num) { - int len = PyObject_Size(tuple); - int i, err; + Py_ssize_t len = PyObject_Size(tuple); + Py_ssize_t i; + int err; for (i = 1; i < len; ++i) { /* elem must always be a sequence, however simple */ @@ -663,7 +664,7 @@ build_node_children(PyObject *tuple, node *root, int *line_num) return (0); } if (ISTERMINAL(type)) { - int len = PyObject_Size(elem); + Py_ssize_t len = PyObject_Size(elem); PyObject *temp; if ((len != 2) && (len != 3)) { |